You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2012/01/16 13:54:02 UTC

svn commit: r1231982 - in /lucene/dev/trunk/solr: CHANGES.txt build.xml webapp/build.xml

Author: janhoy
Date: Mon Jan 16 12:54:01 2012
New Revision: 1231982

URL: http://svn.apache.org/viewvc?rev=1231982&view=rev
Log:
SOLR-2487: Do not include slf4j-jdk14 jar in WAR

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/build.xml
    lucene/dev/trunk/solr/webapp/build.xml

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1231982&r1=1231981&r2=1231982&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Jan 16 12:54:01 2012
@@ -477,6 +477,10 @@ Other Changes
   AppendedSolrParams into factory methods.
   (David Smiley via hossman)
 
+Build
+----------------------
+* SOLR-2487: Add build target to package war without slf4j jars (janhoy)
+
 ==================  3.5.0  ==================
 
 New Features

Modified: lucene/dev/trunk/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/build.xml?rev=1231982&r1=1231981&r2=1231982&view=diff
==============================================================================
--- lucene/dev/trunk/solr/build.xml (original)
+++ lucene/dev/trunk/solr/build.xml Mon Jan 16 12:54:01 2012
@@ -291,7 +291,16 @@
     </ant>
   </target>
   
-  <target name="prepare-release"
+  <target name="dist-war-excl-slf4j"
+          description="Creates a Solr WAR Distribution file, excluding slf4j bindings.">
+    <ant dir="webapp" target="dist" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+      <property name="exclude.from.war" value="*over-slf4j*,slf4j-jdk14*" />
+      <property name="solr.war.suffix" value="-excl-slf4j" />
+    </ant>
+  </target>
+
+	<target name="prepare-release"
           depends="clean, package, generate-maven-artifacts, sign-artifacts"/>
  
   <!-- make a distribution -->

Modified: lucene/dev/trunk/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/build.xml?rev=1231982&r1=1231981&r2=1231982&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/build.xml (original)
+++ lucene/dev/trunk/solr/webapp/build.xml Mon Jan 16 12:54:01 2012
@@ -20,6 +20,9 @@
 
   <import file="../common-build.xml"/>
 
+	<property name="exclude.from.war" value="" />
+  <property name="solr.war.suffix" value="" />
+	
   <!-- Checks that all JSP files in the webapp compile successfully using Jetty's Jasper -->
   <target name="test" depends="compile-test-solr-core">
     <property name="jsp.target" location="${dest}/jsp-temp" />
@@ -47,24 +50,24 @@
                     implementation.title="org.apache.solr"
                     spec.version="${solr.spec.version}"/>
     <ant dir="${common-solr.dir}" inheritall="false" target="contribs-add-to-war"/>
-    <war destfile="${dist}/apache-solr-${version}.war"
+    <war destfile="${dist}/apache-solr-${version}${solr.war.suffix}.war"
          webxml="web/WEB-INF/web.xml"
          manifest="${dest}/META-INF/MANIFEST.MF">
-      <lib dir="${common-solr.dir}/lib">
+      <lib dir="${common-solr.dir}/lib" excludes="${exclude.from.war}">
         <exclude name="servlet-api*.jar" />
         <exclude name="easymock-*.jar" />
         <exclude name="junit-*.jar" />
         <exclude name="*.txt" />
         <exclude name="*.template" />
       </lib>
-      <lib dir="${lucene-libs}"/>
-      <lib dir="${dist}">
+      <lib dir="${lucene-libs}" excludes="${exclude.from.war}"/>
+      <lib dir="${dist}" excludes="${exclude.from.war}">
         <include name="apache-solr-solrj-${version}.jar" />
         <include name="apache-solr-core-${version}.jar" />
       </lib>
-      <fileset dir="${dest}/web"/> <!-- contribs' additions -->
-      <fileset dir="web" />
-      <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/>
+      <fileset dir="${dest}/web" excludes="${exclude.from.war}"/> <!-- contribs' additions -->
+      <fileset dir="web" excludes="${exclude.from.war}"/>
+      <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt" excludes="${exclude.from.war}"/>
     </war>
   </target>