Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>We needed the same in order to run in dev mode our app, which uses Apache solr. The following seemed to work:</p> <ol> <li>declare solr as type=war, scope=tomcat dependency</li> <li>use the tomcat maven plugin (version 1.1) with addContextWarDependencies</li> <li>add system property for solr home as example below</li> </ol> <p>then one can run maven like: <strong>mvn tomcat:run</strong>. Keep in mind that java will require lots of memory in this scenario, so before running maven do <strong>export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=512m"</strong> for example.</p> <p>The pom.xml is like, where we assume there are some properties -<em>including one called solr.home</em>- read from a config file:</p> <pre><code>&lt;project&gt; ... &lt;dependencies&gt; ... &lt;dependency&gt; &lt;groupId&gt;org.apache.solr&lt;/groupId&gt; &lt;artifactId&gt;solr&lt;/artifactId&gt; &lt;version&gt;3.3.0&lt;/version&gt; &lt;type&gt;war&lt;/type&gt; &lt;scope&gt;tomcat&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; ... &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;tomcat-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.1&lt;/version&gt; &lt;configuration&gt; &lt;addContextWarDependencies&gt;true&lt;/addContextWarDependencies&gt; &lt;systemProperties&gt; &lt;property.you.need&gt;${example.property.yours}&lt;/property.you.need&gt; &lt;solr.solr.home&gt;${solr.home}&lt;/solr.solr.home&gt; &lt;/systemProperties&gt; &lt;/configuration&gt; &lt;/plugin&gt; ... &lt;/build&gt; &lt;/project&gt; </code></pre> <p>Solr can then be reached in: </p> <pre><code>http://localhost:8080/solr/admin </code></pre> <p>and your application in </p> <pre><code>http://localhost:8080/your-app-id/ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload