[
https://issues.apache.org/jira/browse/SOLR-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187900#comment-13187900
]
Steven Rowe commented on SOLR-3042:
-----------------------------------
I successfully ran {{mvn jetty:run}} with the patched version on trunk; I've
committed it there.
However, when I applied the patch to branch_3x, I get this error when I run
{{mvn jetty:run}}:
{noformat}
SEVERE: org.apache.solr.common.SolrException: Error loading class
'solr.VelocityResponseWriter'
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:447)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1559)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1553)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1586)
at org.apache.solr.core.SolrCore.initWriters(SolrCore.java:1469)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:556)
{noformat}
Apparently trunk is not affected because the example {{solrconfig.xml}} says to
load {{solr.VelocityResponseWriter}} lazily - branch_3x seems to also have
lazy-startup-loading capabilities - I wonder why this wasn't backported?
I was able to get things to work by setting the {{solr.velocity.enabled}}
system property to false, but people shouldn't have to know that.
When I add a dependency from the {{webapp}} module on the {{velocity}} contrib
module, things just work. This means, though, that the {{velocity}} contrib
will be included in the Maven-built war, unlike the Ant-built war, and I want
to avoid differences like this.
An alternative (works for me) is to add a {{<systemProperty>}} setting to the
{{maven-jetty-plugin}} configuration in the webapp POM:
{code:xml}
<systemProperty>
<name>solr.velocity.enabled</name>
<value>false</value>
</systemProperty>
{code}
David, what do you think?
> Maven jetty plugin is misconfigured
> -----------------------------------
>
> Key: SOLR-3042
> URL: https://issues.apache.org/jira/browse/SOLR-3042
> Project: Solr
> Issue Type: Bug
> Reporter: David Smiley
> Priority: Minor
> Attachments: SOLR-3042_Fix_maven_jetty_plugin_configuration.patch
>
>
> The maven jetty plugin is very popular and useful because it allows you to
> run a web application with a trivial command line execution "mvn jetty:run"
> and without setting up a servlet engine or deploying your app to it. Perhaps
> more importantly, it allows fast debug cycles in development. The plugin is
> misconfigured right now and I'm told its pedigree was a copy-paste from
> somewhere -- it was never verified to work. Attached is a patch that
> configures it properly. There's not much to it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]