You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2012/02/15 16:30:54 UTC
svn commit: r1244536 - in /lucene/dev/trunk: lucene/common-build.xml
modules/facet/build.xml solr/common-build.xml solr/test-framework/build.xml
solr/webapp/build.xml
Author: sarowe
Date: Wed Feb 15 15:30:53 2012
New Revision: 1244536
URL: http://svn.apache.org/viewvc?rev=1244536&view=rev
Log:
LUCENE-3754: Store generated archive manifests in per-module output directories - each artifact gets its own manifest file
Modified:
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/modules/facet/build.xml
lucene/dev/trunk/solr/common-build.xml
lucene/dev/trunk/solr/test-framework/build.xml
lucene/dev/trunk/solr/webapp/build.xml
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1244536&r1=1244535&r2=1244536&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Wed Feb 15 15:30:53 2012
@@ -178,7 +178,7 @@
</condition>
<property name="junit.parallel.selector" value="org.apache.lucene.util.LuceneJUnitDividingSelector"/>
- <property name="manifest.file" location="${common.dir}/build/MANIFEST.MF"/>
+ <property name="manifest.file" location="${build.dir}/MANIFEST.MF"/>
<!--
we attempt to exec svnversion to get details build information
@@ -386,8 +386,9 @@
<attribute name="title"/>
<attribute name="implementation.title"/>
<attribute name="spec.version"/>
+ <attribute name="manifest.file" default="${manifest.file}"/>
<sequential>
- <manifest file="${manifest.file}">
+ <manifest file="@{manifest.file}">
<!--
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
@@ -434,6 +435,7 @@
<attribute name="metainf.source.dir" default="${common.dir}"/>
<attribute name="implementation.title" default="org.apache.lucene"/>
<attribute name="spec.version" default="${spec.version}"/>
+ <attribute name="manifest.file" default="${manifest.file}"/>
<element name="nested" optional="true" implicit="true"/>
<sequential>
<!-- If possible, include the svnversion -->
@@ -444,11 +446,12 @@
<build-manifest title="@{title}"
implementation.title="@{implementation.title}"
- spec.version="@{spec.version}"/>
+ spec.version="@{spec.version}"
+ manifest.file="@{manifest.file}"/>
<jar destfile="@{destfile}"
basedir="@{basedir}"
- manifest="${manifest.file}"
+ manifest="@{manifest.file}"
excludes="@{excludes}">
<metainf dir="@{metainf.source.dir}" includes="LICENSE.txt,NOTICE.txt"/>
<nested />
Modified: lucene/dev/trunk/modules/facet/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/facet/build.xml?rev=1244536&r1=1244535&r2=1244536&view=diff
==============================================================================
--- lucene/dev/trunk/modules/facet/build.xml (original)
+++ lucene/dev/trunk/modules/facet/build.xml Wed Feb 15 15:30:53 2012
@@ -64,8 +64,9 @@
<target name="jar-examples" depends="compile-examples">
<jarify basedir="${build.dir}/classes/examples"
- destfile="${build.dir}/${final.name}-examples.jar"
- title="Lucene Search Engine: ${ant.project.name}-examples">
+ destfile="${build.dir}/${final.name}-examples.jar"
+ title="Lucene Search Engine: ${ant.project.name}-examples"
+ manifest.file="${build.dir}/EXAMPLES-MANIFEST.MF">
<fileset dir="src/examples" />
</jarify>
</target>
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1244536&r1=1244535&r2=1244536&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Wed Feb 15 15:30:53 2012
@@ -43,7 +43,6 @@
<property name="package.dir" location="${common-solr.dir}/package"/>
<property name="maven.dist.dir" location="${package.dir}/maven"/>
<property name="lucene-libs" location="${dest}/lucene-libs" />
- <property name="manifest.file" location="${dest}/META-INF/MANIFEST.MF"/>
<property name="tests.userdir" value="src/test-files"/>
<property name="example" value="${common-solr.dir}/example" />
<property name="javadoc.dir" location="${build.dir}/docs/api"/>
@@ -162,12 +161,31 @@
</target>
<!-- Shared core/solrj/test-framework/contrib targets -->
+
+ <macrodef name="solr-jarify" description="Builds a Solr JAR file">
+ <attribute name="basedir" default="${build.dir}/classes/java"/>
+ <attribute name="destfile" default="${build.dir}/${final.name}.jar"/>
+ <attribute name="title" default="Apache Solr Search Server: ${ant.project.name}"/>
+ <attribute name="excludes" default="**/pom.xml,**/*.iml"/>
+ <attribute name="metainf.source.dir" default="${common-solr.dir}"/>
+ <attribute name="implementation.title" default="org.apache.solr"/>
+ <attribute name="spec.version" default="${solr.spec.version}"/>
+ <attribute name="manifest.file" default="${manifest.file}"/>
+ <element name="nested" optional="true" implicit="true"/>
+ <sequential>
+ <jarify basedir="@{basedir}" destfile="@{destfile}"
+ title="@{title}" excludes="@{excludes}"
+ metainf.source.dir="@{metainf.source.dir}"
+ implementation.title="@{implementation.title}"
+ spec.version="@{spec.version}"
+ manifest.file="@{manifest.file}">
+ <nested/>
+ </jarify>
+ </sequential>
+ </macrodef>
+
<target name="jar-core" depends="compile-core">
- <mkdir dir="${dest}/META-INF/"/>
- <jarify title="Apache Solr Search Server: ${ant.project.name}"
- metainf.source.dir="${common-solr.dir}"
- implementation.title="org.apache.solr"
- spec.version="${solr.spec.version}"/>
+ <solr-jarify/>
</target>
<target name="compile-core" depends="prep-lucene-jars,common.compile-core"/>
@@ -194,12 +212,7 @@
<packageset dir="${src.dir}"/>
</sources>
</invoke-javadoc>
- <jarify basedir="${javadoc.dir}"
- destfile="${build.dir}/${final.name}-javadoc.jar"
- title="Apache Solr Search Server: ${ant.project.name}"
- metainf.source.dir="${common-solr.dir}"
- implementation.title="org.apache.solr"
- spec.version="${solr.spec.version}"/>
+ <solr-jarify basedir="${javadoc.dir}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
</sequential>
</target>
@@ -224,11 +237,7 @@
</target>
<target name="jar-src" depends="init">
- <jarify basedir="${src.dir}"
- destfile="${build.dir}/${final.name}-src.jar"
- implementation.title="org.apache.solr"
- metainf.source.dir="${common-solr.dir}"
- spec.version="${solr.spec.version}"/>
+ <solr-jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar"/>
</target>
<!-- Solr core targets -->
Modified: lucene/dev/trunk/solr/test-framework/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/build.xml?rev=1244536&r1=1244535&r2=1244536&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/build.xml (original)
+++ lucene/dev/trunk/solr/test-framework/build.xml Wed Feb 15 15:30:53 2012
@@ -59,12 +59,7 @@
<packageset dir="${src.dir}"/>
</sources>
</invoke-javadoc>
- <jarify basedir="${javadoc.dir}"
- destfile="${build.dir}/${final.name}-javadoc.jar"
- title="Apache Solr Search Server: ${ant.project.name}"
- metainf.source.dir="${common-solr.dir}"
- implementation.title="org.apache.solr"
- spec.version="${solr.spec.version}"/>
+ <solr-jarify basedir="${javadoc.dir}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
<mkdir dir="${dest}/docs/api/test-framework"/>
<copy todir="${dest}/docs/api/test-framework">
<fileset dir="${javadoc.dir}"/>
Modified: lucene/dev/trunk/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/build.xml?rev=1244536&r1=1244535&r2=1244536&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/build.xml (original)
+++ lucene/dev/trunk/solr/webapp/build.xml Wed Feb 15 15:30:53 2012
@@ -52,7 +52,7 @@
<ant dir="${common-solr.dir}" inheritall="false" target="contribs-add-to-war"/>
<war destfile="${dist}/apache-solr-${version}${solr.war.suffix}.war"
webxml="web/WEB-INF/web.xml"
- manifest="${dest}/META-INF/MANIFEST.MF">
+ manifest="${manifest.file}">
<lib dir="${common-solr.dir}/lib" excludes="${exclude.from.war}">
<exclude name="servlet-api*.jar" />
<exclude name="easymock-*.jar" />