FWIW, we have some custom classes on top of solr as well. The way we do
it is using the following ant target:

  <target name="war" depends="jar" description="Rebuild Solr WAR with
custom code">
    <mkdir dir="${maven.webapps.output}"/>
    <!-- we unwar a copy of the 3.2.0 war file in source repo -->
    <unwar src="${prod.common.lib.external.solr}/apache-solr-3.2.0.war"
dest="${maven.webapps.output}"/>
    <!-- add in some extra jar files our custom stuff needs -->
    <copy todir="${maven.webapps.output}/WEB-INF/lib">
      <fileset refid="..."/>
      <fileset refid="..."/>
      ...
    </copy>
    <!-- the jar target builds just our custom classes into a
hl-solr.jar, which is copied over to the WEB-INF/lib of the 
exploded solr war -->
    <copy file="${maven.build.directory}/hl-solr.jar"
todir="${maven.webapps.output}/WEB-INF/lib"/>
    </war>

Seems to work fine...basically automates what you have described in your
second paragraph, but allows us to keep our own code separately from
solr code under source control.

-sujit

On Tue, 2011-08-16 at 16:09 -0700, arian487 wrote:
> So the way I generate war files now is by running an 'ant dist' in the solr
> folder.  It generates the war fine and I get a build success, and then I
> deploy it to tomcat and once again the logs show it was successful (from the
> looks of it).  However, when I go to 'myip:8080/solr/admin' I get an HTTP
> status 404.
> 
> However, it works when I take a war from the nightly build, expand it, drop
> some new class files in there that I need, and close it up again.  The solr
> I have checked out seems fine though and I can't find any differences
> between the war I'm generating and the one that has been generated.
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Problems-generating-war-distribution-using-ant-tp3260070p3260070.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to