Apache Lucene open-source search software
LUCENE-4758: 'ant jar', 'ant compile' and 'ant compile-test' should recurse
Steven Rowebf4e0ab18c52
diff --git a/build.xml b/build.xmlindex 026a20377bf..67db2ab0e5c 100644--- a/build.xml+++ b/build.xml@@ -102,6 +102,7 @@</subant></target>+ <!-- lucene/test-framework and solr/test-framework are excluded from compilation --><target name="compile" description="Compile Lucene and Solr"><subant target="compile" inheritall="false" failonerror="true"><fileset dir="lucene" includes="build.xml" />@@ -109,6 +110,20 @@</subant></target>+ <target name="compile-test" description="Compile Lucene and Solr tests and test-frameworks">+ <subant target="compile-test" inheritAll="false" failonerror="true">+ <fileset dir="lucene" includes="build.xml" />+ <fileset dir="solr" includes="build.xml" />+ </subant>+ </target>++ <target name="jar" description="Build Lucene and Solr Jar files">+ <subant target="jar" inheritall="false" failonerror="true">+ <fileset dir="lucene" includes="build.xml"/>+ <fileset dir="solr" includes="build.xml"/>+ </subant>+ </target>+<property name="version" value="5.0-SNAPSHOT"/><property name="maven-build-dir" value="maven-build"/><property name="maven-version" value="2.2.1"/>diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex bd6f0ae15fd..bc161c6f192 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -151,6 +151,9 @@ Build* LUCENE-4570: Use the Policeman Forbidden API checker, released separatelyfrom Lucene and downloaded via Ivy. (Uwe Schindler, Robert Muir)+* LUCENE-4758: 'ant jar', 'ant compile', and 'ant compile-test' should+ recurse. (Steve Rowe)+======================= Lucene 4.1.0 =======================Changes in backwards compatibility policydiff --git a/lucene/analysis/build.xml b/lucene/analysis/build.xmlindex 27a600934fc..48921b3a9d3 100644--- a/lucene/analysis/build.xml+++ b/lucene/analysis/build.xml@@ -104,6 +104,10 @@<target name="test"><forall-analyzers target="test"/></target>+ <target name="jar">+ <forall-analyzers target="jar-core"/>+ </target>+ <target name="jar-core" depends="jar"/><target name="build-artifacts-and-tests" depends="default,compile-test" />diff --git a/lucene/build.xml b/lucene/build.xmlindex 7961b92ac9a..6effca0b934 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -145,6 +145,12 @@<target name="compile-core" depends="compile-lucene-core"/>+ <!-- lucene/test-framework is excluded from compilation -->+ <target name="compile" depends="init,compile-lucene-core,compile-codecs"+ description="Compiles core, codecs, and all modules">+ <modules-crawl target="compile-core"/>+ </target>+<!-- Validation (license/notice/api checks). --><target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />@@ -526,7 +532,7 @@<modules-crawl target="build-artifacts-and-tests"/></target>- <target name="compile-test" description="Builds core, test-framework, and modules tests">+ <target name="compile-test" description="Builds core, codecs, test-framework, and modules tests"><sequential><ant dir="core" target="compile-test" inheritall="false"><propertyset refid="uptodate.and.compiled.properties"/>@@ -575,6 +581,11 @@<property name="lucene-core.uptodate" value="true"/></target>+ <target name="jar" depends="jar-core,jar-test-framework"+ description="Jars core, codecs, test-framework, and all modules">+ <modules-crawl target="jar-core"/>+ </target>+<target name="get-jenkins-line-docs" unless="enwiki.exists"><sequential><!-- TODO: can get .lzma instead (it's ~17% smaller) but there's no builtin ant support...? -->diff --git a/solr/build.xml b/solr/build.xmlindex 963a6c9c667..2a0c947bdbc 100644--- a/solr/build.xml+++ b/solr/build.xml@@ -126,9 +126,11 @@<!-- ========================================================================= --><!-- ========================== BUILD/TEST TASKS ============================= --><!-- ========================================================================= -->-++ <!-- solr/test-framework is excluded from compilation --><target name="compile" description="Compile the source code."depends="compile-core, compile-contrib"/>+<target name="test" description="Validate, then run core, solrj, and contrib unit tests."depends="test-core, test-contrib"/><!-- "-clover.load" is *not* a useless dependency. do not remove -->@@ -136,7 +138,7 @@depends="-clover.load, test-solr-core, test-solrj"/><target name="pitest" description="Validate, then run core, solrj, and contrib unit tests."depends="pitest-core, pitest-contrib"/>- <target name="compile-test" description="Compile unit tests."+ <target name="compile-test" description="Compile core, solrj, and contrib unit tests, and solr-test-framework."depends="compile-solr-test-framework, compile-test-solr-core, compile-test-solrj, compile-test-contrib"/><target name="javadocs" description="Calls javadocs-all, javadocs-solrj, and javadocs-test-framework"depends="define-lucene-javadoc-url,javadocs-solr-core,javadocs-solrj,javadocs-test-framework,javadocs-contrib"/>@@ -173,12 +175,21 @@</copy></target>+ <target name="jar" depends="jar-core,jar-solrj,jar-solr-test-framework,jar-contrib"+ description="Jar solr core, solrj, solr-test-framework, and all contribs"/>+<!-- Solr core targets --><target name="test-solr-core" description="Test solr core"><ant dir="core" target="test" inheritAll="false"><propertyset refid="uptodate.and.compiled.properties"/></ant></target>++ <target name="jar-core">+ <ant dir="${common-solr.dir}/core" target="jar-core" inheritAll="false">+ <propertyset refid="uptodate.and.compiled.properties"/>+ </ant>+ </target><!-- Solrj targets --><target name="test-solrj" description="Test java client">diff --git a/solr/common-build.xml b/solr/common-build.xmlindex 3a90428a730..04eb9399588 100644--- a/solr/common-build.xml+++ b/solr/common-build.xml@@ -183,7 +183,7 @@</jarify></sequential></macrodef>-+<target name="jar-core" depends="compile-core"><solr-jarify/></target>@@ -367,6 +367,11 @@<propertyset refid="uptodate.and.compiled.properties"/></ant></target>+ <target name="jar-solrj" description="Jar Solr-J">+ <ant dir="${common-solr.dir}/solrj" target="jar-core" inheritAll="false">+ <propertyset refid="uptodate.and.compiled.properties"/>+ </ant>+ </target><!-- TODO: really a copy should work: but sync is currently safersince some buggy tests don't create their own tempdir but@@ -386,6 +391,12 @@<property name="solr.test.framework.compiled" value="true"/></target>+ <target name="jar-solr-test-framework" depends="compile-solr-test-framework">+ <ant dir="${common-solr.dir}/test-framework" target="jar-core" inheritAll="false">+ <propertyset refid="uptodate.and.compiled.properties"/>+ </ant>+ </target>+<!-- resolve dependencies in the example (relied upon by compile/tests) --><target name="resolve-example" unless="example.libs.uptodate"><ant dir="${common-solr.dir}/example" target="resolve" inheritAll="false">@@ -421,6 +432,10 @@<contrib-crawl target="javadocs"/></target>+ <target name="jar-contrib" description="Jar contrib modules">+ <contrib-crawl target="jar-core"/>+ </target>+<target name="contribs-add-to-war"><mkdir dir="${dest}/web"/><delete dir="${dest}/web" includes="**/*" failonerror="false"/>