We have a maven project to build a war containing everything from the Solr war, plus some of our own code. Here's the relevant stuff from our pom.xml: <packaging>war</packaging> <dependencies> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-core</artifactId> </dependency> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr</artifactId> <type>war</type> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> <configuration> <packagingExcludes> WEB-INF/lib/log4j-over-slf4j-1.6.1.jar, WEB-INF/lib/slf4j-api-1.6.1.jar, WEB-INF/lib/slf4j-jdk14-1.6.1.jar </packagingExcludes> </configuration> </plugin> </plugins> </build>
Not sure if that helps answer your question... -Michael -----Original Message----- From: Billy Newman [mailto:newman...@gmail.com] Sent: Sunday, October 14, 2012 11:51 AM To: solr-user@lucene.apache.org Subject: Building solr with maven Ok so I must admit another weird question.... We have a ton of different servers in which we deploy, some with cert auth, some with form auth, some with basic auth, etc. When I deploy Solr I want to protect some things behind the correct auth for the server I am deploying. I.E. protect the admin console, upadates/creates/deletes on restful URLs, etc.. I have thought of maybe just checking in the solr code into our source control and creating a parent pom that will build solr several times (one for each deployment, solr-cert.war, solr-basic.war, etc). That way I can modify the web.xml correctly in each case. Being that our builds are in maven I was hoping this would be an easy task, however the problem seems to be more difficult to do as the solr src does not really build from maven out of the box. Has anyone had any success with doing something like this, or maybe even a better alternative? In the end it might just be easier to build the war once and then extract the contents, create all the wars I need and publish those to my local archiva repository. Thanks again guys. Billy