[ 
https://issues.apache.org/jira/browse/SOLR-2588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steven Rowe updated SOLR-2588:
------------------------------

    Attachment: SOLR-2588.patch

Erik, your patch was missing some files that you moved but didn't make changes 
to.

I made a new patch with a few changes:

# All Solr contrib {{test-files/}} directories are namespaced with the contrib 
name, so that same-named files shared between core and contrib don't overwrite 
each other (see SOLR-2659) - I moved {{contrib/velocity/src/test-files/solr/}} 
under {{contrib/velocity/src/test-files/velocity/}} and added an overridden 
{{getSolrHome()}} to the test class.
# Added IntelliJ IDEA configuration for the new velocity contrib.
# Generated the patch from the top-level directory instead of from the 
{{solr/}} directory.

The test passes for me.

Here are the svn commands to run before applying the patch:

{code}
svn mv --parents 
solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java 
solr/contrib/velocity/src/test/org/apache/solr/response/VelocityResponseWriterTest.java
svn mv --parents 
solr/core/src/java/org/apache/solr/response/VelocityResponseWriter.java 
solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
svn mv --parents 
solr/core/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java 
solr/contrib/velocity/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java
svn mv --parents 
solr/core/src/java/org/apache/solr/response/SolrParamResourceLoader.java 
solr/contrib/velocity/src/java/org/apache/solr/response/SolrParamResourceLoader.java
svn mv --parents 
solr/core/src/test-files/solr/conf/velocity/VM_global_library.vm 
solr/contrib/velocity/src/test-files/velocity/solr/conf/velocity/VM_global_library.vm
svn rm solr/core/src/test-files/solr/conf/velocity
{code}

Erik, can you take a look and see if I've screwed anything up?

I'll work on the Maven build configuration later today.

> Make Velocity an optional dependency in SolrCore
> ------------------------------------------------
>
>                 Key: SOLR-2588
>                 URL: https://issues.apache.org/jira/browse/SOLR-2588
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 3.2
>            Reporter: Gunnar Wagenknecht
>            Assignee: Erik Hatcher
>            Priority: Minor
>             Fix For: 3.4, 4.0
>
>         Attachments: SOLR-2588.patch, SOLR-2588.patch, 
> SOLR-2588_Don_t_fail_if_velocity_libs_not_present_.patch
>
>
> In 1.4. it was fine to run Solr without Velocity on the classpath. However, 
> in 3.2. SolrCore won't load because of a hard reference to the Velocity 
> response writer in a static initializer.
> {noformat}
> ... ERROR org.apache.solr.core.CoreContainer - 
> java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
>       at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:1447)
>       at org.apache.solr.core.CoreContainer.create(CoreContainer.java:463)
>       at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
>       at org.apache.solr.core.CoreContainer.load(CoreContainer.java:207)
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to