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/04/03 22:52:03 UTC
svn commit: r1309141 - in /lucene/dev/trunk: ./ lucene/ modules/grouping/
modules/join/ modules/queries/ modules/queryparser/ modules/suggest/ solr/
solr/contrib/langid/ solr/webapp/
Author: sarowe
Date: Tue Apr 3 20:52:02 2012
New Revision: 1309141
URL: http://svn.apache.org/viewvc?rev=1309141&view=rev
Log:
LUCENE-3944: Make the 'generate-maven-artifacts' target use filtered POMs placed under lucene/build/poms/, rather than in each module's base directory. The 'clean' target now removes them.
Modified:
lucene/dev/trunk/build.xml
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/build.xml
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/modules/grouping/build.xml
lucene/dev/trunk/modules/join/build.xml
lucene/dev/trunk/modules/queries/build.xml
lucene/dev/trunk/modules/queryparser/build.xml
lucene/dev/trunk/modules/suggest/build.xml
lucene/dev/trunk/solr/build.xml
lucene/dev/trunk/solr/common-build.xml
lucene/dev/trunk/solr/contrib/langid/build.xml
lucene/dev/trunk/solr/webapp/build.xml
Modified: lucene/dev/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/build.xml (original)
+++ lucene/dev/trunk/build.xml Tue Apr 3 20:52:02 2012
@@ -77,13 +77,16 @@
</copy>
</target>
- <target name="generate-maven-artifacts" description="Generate Maven Artifacts for Lucene and Solr">
+ <target name="generate-maven-artifacts"
+ description="Generate Maven Artifacts for Lucene and Solr">
<property name="maven.dist.dir" location="dist/maven" />
<mkdir dir="${maven.dist.dir}" />
<sequential>
+ <ant dir="lucene" target="filter-pom-templates"/>
<subant target="generate-maven-artifacts" inheritall="false" failonerror="true">
<property name="maven.dist.dir" location="${maven.dist.dir}" />
+ <property name="filtered.pom.templates.uptodate" value="true"/>
<fileset dir="lucene" includes="build.xml" />
<fileset dir="modules" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Tue Apr 3 20:52:02 2012
@@ -1065,6 +1065,11 @@ Build
* LUCENE-3762: Upgrade JUnit to 4.10, refactor state-machine of detecting
setUp/tearDown call chaining in LuceneTestCase. (Dawid Weiss, Robert Muir)
+* LUCENE-3944: Make the 'generate-maven-artifacts' target use filtered POMs
+ placed under lucene/build/poms/, rather than in each module's base
+ directory. The 'clean' target now removes them.
+ (Steve Rowe, Robert Muir)
+
======================= Lucene 3.5.0 =======================
Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Tue Apr 3 20:52:02 2012
@@ -450,13 +450,9 @@
</target>
- <target name="generate-maven-artifacts" depends="install-maven-tasks, package, javadocs">
+ <target name="generate-maven-artifacts"
+ depends="install-maven-tasks, filter-pom-templates, package, javadocs">
<sequential>
- <ant target="get-maven-poms" dir=".."/>
-
- <m2-deploy pom.xml="../pom.xml"/> <!-- Lucene/Solr grandparent POM -->
- <m2-deploy pom.xml="pom.xml"/> <!-- Lucene parent POM -->
-
<subant target="dist-maven" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${common.dir}/core" includes="build.xml"/>
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Tue Apr 3 20:52:02 2012
@@ -196,6 +196,8 @@
<property name="gpg.exe" value="gpg" />
<property name="gpg.key" value="CODE SIGNING KEY" />
+ <property name="filtered.pom.templates.dir" location="${common.dir}/build/poms"/>
+
<property name="clover.db.dir" location="${common.dir}/build/test/clover/db"/>
<property name="clover.report.dir" location="${common.dir}/build/test/clover/reports"/>
@@ -399,7 +401,7 @@
<macrodef name="m2-deploy" description="Builds a Maven artifact">
<element name="artifact-attachments" optional="yes"/>
- <attribute name="pom.xml" default="pom.xml"/>
+ <attribute name="pom.xml"/>
<attribute name="jar.file" default="${build.dir}/${final.name}.jar"/>
<sequential>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
@@ -844,10 +846,23 @@
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath"/>
</target>
-
- <target name="dist-maven" if="pom.xml.present" depends="jar-core, jar-src, javadocs, install-maven-tasks">
- <sequential>
- <m2-deploy>
+
+ <target name="dist-maven"
+ depends="filter-pom-templates, install-maven-tasks, m2-deploy-lucene-parent-pom, dist-maven-common"/>
+ <target name="dist-maven-common"
+ depends="jar-core, jar-src, javadocs, install-maven-tasks, filter-pom-templates">
+ <sequential>
+ <property name="top.level.dir" location="${common.dir}/.."/>
+ <pathconvert property="pom.xml">
+ <mapper>
+ <chainedmapper>
+ <globmapper from="${top.level.dir}*" to="${filtered.pom.templates.dir}*"/>
+ <globmapper from="*build.xml" to="*pom.xml"/>
+ </chainedmapper>
+ </mapper>
+ <path location="${ant.file}"/>
+ </pathconvert>
+ <m2-deploy pom.xml="${pom.xml}">
<artifact-attachments>
<attach file="${build.dir}/${final.name}-src.jar"
classifier="sources"/>
@@ -858,6 +873,30 @@
</sequential>
</target>
+ <target name="filter-pom-templates" unless="filtered.pom.templates.uptodate">
+ <mkdir dir="${filtered.pom.templates.dir}"/>
+ <copy todir="${common.dir}/build/poms" overwrite="true">
+ <fileset dir="${common.dir}/../dev-tools/maven"/>
+ <filterset begintoken="@" endtoken="@">
+ <filter token="version" value="${version}"/>
+ </filterset>
+ <globmapper from="*.template" to="*"/>
+ </copy>
+ <property name="filtered.pom.templates.uptodate" value="true"/>
+ </target>
+
+ <target name="m2-deploy-lucene-parent-pom" depends="filter-pom-templates,m2-deploy-grandparent-pom"
+ unless="deployed.lucene.parent.pom.uptodate">
+ <m2-deploy pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
+ <property name="deployed.lucene.parent.pom.uptodate" value="true"/>
+ </target>
+
+ <target name="m2-deploy-grandparent-pom" depends="filter-pom-templates"
+ unless="deployed.grandparent.pom.uptodate">
+ <m2-deploy pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
+ <property name="deployed.grandparent.pom.uptodate" value="true"/>
+ </target>
+
<target name="rat-sources-typedef">
<typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:rat.anttasks">
<classpath>
Modified: lucene/dev/trunk/modules/grouping/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/grouping/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/modules/grouping/build.xml (original)
+++ lucene/dev/trunk/modules/grouping/build.xml Tue Apr 3 20:52:02 2012
@@ -40,7 +40,6 @@
<path refid="base.classpath"/>
</path>
- <target name="dist-maven" depends="jar-core,javadocs,common.dist-maven" />
<target name="compile" depends="jar-queries,common.compile-core" description="Compiles facet classes" />
<target name="jar-core" depends="common.jar-core" />
Modified: lucene/dev/trunk/modules/join/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/join/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/modules/join/build.xml (original)
+++ lucene/dev/trunk/modules/join/build.xml Tue Apr 3 20:52:02 2012
@@ -21,6 +21,4 @@
</path>
<target name="init" depends="contrib-build.init,jar-grouping"/>
-
- <target name="dist-maven" depends="jar-core,javadocs,common.dist-maven" />
</project>
Modified: lucene/dev/trunk/modules/queries/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queries/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queries/build.xml (original)
+++ lucene/dev/trunk/modules/queries/build.xml Tue Apr 3 20:52:02 2012
@@ -25,6 +25,4 @@
<property name="maven.dist.dir" location="../dist/maven"/>
<import file="../../lucene/contrib/contrib-build.xml"/>
-
- <target name="dist-maven" depends="jar-core,javadocs,common.dist-maven"/>
</project>
\ No newline at end of file
Modified: lucene/dev/trunk/modules/queryparser/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/build.xml (original)
+++ lucene/dev/trunk/modules/queryparser/build.xml Tue Apr 3 20:52:02 2012
@@ -34,8 +34,6 @@
<target name="compile-core" depends="jar-queries,jar-sandbox,common.compile-core"/>
- <target name="dist-maven" depends="jar-core,javadocs,common.dist-maven"/>
-
<target name="javacc" depends="init,javacc-check,javacc-QueryParser,javacc-surround,javacc-flexible"/>
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
Modified: lucene/dev/trunk/modules/suggest/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/suggest/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/modules/suggest/build.xml (original)
+++ lucene/dev/trunk/modules/suggest/build.xml Tue Apr 3 20:52:02 2012
@@ -28,6 +28,4 @@
<property name="maven.dist.dir" location="../dist/maven" />
<import file="../../lucene/contrib/contrib-build.xml"/>
-
- <target name="dist-maven" depends="jar-core,javadocs,common.dist-maven" />
</project>
Modified: lucene/dev/trunk/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/solr/build.xml (original)
+++ lucene/dev/trunk/solr/build.xml Tue Apr 3 20:52:02 2012
@@ -537,8 +537,6 @@
<target name="generate-maven-artifacts" depends="install-maven-tasks">
<sequential>
- <ant target="get-maven-poms" dir=".." inheritall="false"/>
- <m2-deploy pom.xml="pom.xml"/> <!-- Solr parent POM -->
<subant target="dist-maven" inheritall="false" >
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Tue Apr 3 20:52:02 2012
@@ -237,6 +237,15 @@
<solr-jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar"/>
</target>
+ <target name="m2-deploy-solr-parent-pom" depends="filter-pom-templates"
+ unless="deployed.solr.parent.pom.uptodate">
+ <m2-deploy pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
+ <property name="deployed.solr.parent.pom.uptodate" value="true"/>
+ </target>
+
+ <target name="dist-maven"
+ depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common"/>
+
<!-- Solr core targets -->
<target name="compile-solr-core" description="Compile Solr core." unless="solr.core.compiled">
<ant dir="${common-solr.dir}/core" target="compile-core" inheritAll="false">
Modified: lucene/dev/trunk/solr/contrib/langid/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/langid/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/langid/build.xml (original)
+++ lucene/dev/trunk/solr/contrib/langid/build.xml Tue Apr 3 20:52:02 2012
@@ -32,7 +32,7 @@
</path>
<dirname file="${ant.file.solr-langid}" property="solr-langid.dir"/>
- <target name="dist-maven" depends="jar-core,javadocs,jar-src,common.dist-maven">
+ <target name="dist-maven" depends="common-solr.dist-maven">
<m2-deploy-with-pom-template pom.xml="${solr-langid.dir}/lib/langdetect-pom.xml.template"
jar.file="${solr-langid.dir}/lib/langdetect-c51112119be53a81e59706ce57bacaa90c052284.jar" />
</target>
Modified: lucene/dev/trunk/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/build.xml?rev=1309141&r1=1309140&r2=1309141&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/build.xml (original)
+++ lucene/dev/trunk/solr/webapp/build.xml Tue Apr 3 20:52:02 2012
@@ -69,7 +69,8 @@
</war>
</target>
- <target name="dist-maven" depends="dist" if="pom.xml.present">
- <m2-deploy jar.file="${dist}/apache-solr-${version}.war"/>
+ <target name="dist-maven" depends="dist, filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom">
+ <m2-deploy jar.file="${dist}/apache-solr-${version}.war"
+ pom.xml="${filtered.pom.templates.dir}/solr/webapp/pom.xml"/>
</target>
</project>