SOLR-2487: Do not include slf4j-jdk14 jar in WAR

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1231982 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jan Høydahl 2012-01-16 12:54:01 +00:00
parent 43c6d8a843
commit 49d3605946
3 changed files with 24 additions and 8 deletions

View File

@ -477,6 +477,10 @@ Other Changes
AppendedSolrParams into factory methods. AppendedSolrParams into factory methods.
(David Smiley via hossman) (David Smiley via hossman)
Build
----------------------
* SOLR-2487: Add build target to package war without slf4j jars (janhoy)
================== 3.5.0 ================== ================== 3.5.0 ==================
New Features New Features

View File

@ -291,7 +291,16 @@
</ant> </ant>
</target> </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"/> depends="clean, package, generate-maven-artifacts, sign-artifacts"/>
<!-- make a distribution --> <!-- make a distribution -->

View File

@ -20,6 +20,9 @@
<import file="../common-build.xml"/> <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 --> <!-- Checks that all JSP files in the webapp compile successfully using Jetty's Jasper -->
<target name="test" depends="compile-test-solr-core"> <target name="test" depends="compile-test-solr-core">
<property name="jsp.target" location="${dest}/jsp-temp" /> <property name="jsp.target" location="${dest}/jsp-temp" />
@ -47,24 +50,24 @@
implementation.title="org.apache.solr" implementation.title="org.apache.solr"
spec.version="${solr.spec.version}"/> spec.version="${solr.spec.version}"/>
<ant dir="${common-solr.dir}" inheritall="false" target="contribs-add-to-war"/> <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" webxml="web/WEB-INF/web.xml"
manifest="${dest}/META-INF/MANIFEST.MF"> 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="servlet-api*.jar" />
<exclude name="easymock-*.jar" /> <exclude name="easymock-*.jar" />
<exclude name="junit-*.jar" /> <exclude name="junit-*.jar" />
<exclude name="*.txt" /> <exclude name="*.txt" />
<exclude name="*.template" /> <exclude name="*.template" />
</lib> </lib>
<lib dir="${lucene-libs}"/> <lib dir="${lucene-libs}" excludes="${exclude.from.war}"/>
<lib dir="${dist}"> <lib dir="${dist}" excludes="${exclude.from.war}">
<include name="apache-solr-solrj-${version}.jar" /> <include name="apache-solr-solrj-${version}.jar" />
<include name="apache-solr-core-${version}.jar" /> <include name="apache-solr-core-${version}.jar" />
</lib> </lib>
<fileset dir="${dest}/web"/> <!-- contribs' additions --> <fileset dir="${dest}/web" excludes="${exclude.from.war}"/> <!-- contribs' additions -->
<fileset dir="web" /> <fileset dir="web" excludes="${exclude.from.war}"/>
<metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/> <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt" excludes="${exclude.from.war}"/>
</war> </war>
</target> </target>