You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by arian487 <ak...@tagged.com> on 2011/08/17 01:09:13 UTC
Problems generating war distribution using ant
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.
Re: Problems generating war distribution using ant
Posted by arian487 <ak...@tagged.com>.
Stupid me. The output file was named something else. I really need to make
a proper servlet mapping. Works now :D
--
View this message in context: http://lucene.472066.n3.nabble.com/Problems-generating-war-distribution-using-ant-tp3260070p3260843.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Problems generating war distribution using ant
Posted by arian487 <ak...@tagged.com>.
Interesting. I can use this as an option and create a custom 'war' target if
need be but I'd like to avoid this. I'd rather do a full build from the
source code I have checked out from the SVN. Any reason why 'ant dist'
doesn't produce a good war file?
--
View this message in context: http://lucene.472066.n3.nabble.com/Problems-generating-war-distribution-using-ant-tp3260070p3260126.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Problems generating war distribution using ant
Posted by arian487 <ak...@tagged.com>.
Interesting. I can use this as an option and create a custom 'war' target if
need be but I'd like to avoid this. I'd rather do a full build from the
source code I have checked out from the SVN. Any reason why 'ant dist'
doesn't produce a good war file?
--
View this message in context: http://lucene.472066.n3.nabble.com/Problems-generating-war-distribution-using-ant-tp3260070p3260122.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Problems generating war distribution using ant
Posted by Sujit Pal <su...@comcast.net>.
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.