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/04 00:03:02 UTC
svn commit: r1309170 - in /lucene/dev/branches/branch_3x: ./ build.xml
lucene/ lucene/CHANGES.txt lucene/common-build.xml solr/ solr/build.xml
solr/common-build.xml solr/contrib/langid/build.xml solr/webapp/build.xml
Author: sarowe
Date: Tue Apr 3 22:03:02 2012
New Revision: 1309170
URL: http://svn.apache.org/viewvc?rev=1309170&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/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/build.xml
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/CHANGES.txt
lucene/dev/branches/branch_3x/lucene/common-build.xml
lucene/dev/branches/branch_3x/solr/ (props changed)
lucene/dev/branches/branch_3x/solr/build.xml
lucene/dev/branches/branch_3x/solr/common-build.xml
lucene/dev/branches/branch_3x/solr/contrib/langid/build.xml
lucene/dev/branches/branch_3x/solr/webapp/build.xml
Modified: lucene/dev/branches/branch_3x/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/build.xml (original)
+++ lucene/dev/branches/branch_3x/build.xml Tue Apr 3 22:03:02 2012
@@ -74,13 +74,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="solr" includes="build.xml" />
</subant>
Modified: lucene/dev/branches/branch_3x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/CHANGES.txt?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/CHANGES.txt Tue Apr 3 22:03:02 2012
@@ -362,6 +362,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/branches/branch_3x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/common-build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/common-build.xml Tue Apr 3 22:03:02 2012
@@ -185,6 +185,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"/>
@@ -387,7 +389,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"/>
@@ -778,10 +780,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"/>
@@ -792,6 +807,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/branches/branch_3x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/build.xml Tue Apr 3 22:03:02 2012
@@ -543,9 +543,8 @@
<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" >
+ <propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
<fileset dir="solrj" includes="build.xml"/>
<fileset dir="test-framework" includes="build.xml"/>
Modified: lucene/dev/branches/branch_3x/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/common-build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/common-build.xml Tue Apr 3 22:03:02 2012
@@ -224,6 +224,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/branches/branch_3x/solr/contrib/langid/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/langid/build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/langid/build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/contrib/langid/build.xml Tue Apr 3 22:03: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-r111-java5.jar" />
</target>
Modified: lucene/dev/branches/branch_3x/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/webapp/build.xml?rev=1309170&r1=1309169&r2=1309170&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/webapp/build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/webapp/build.xml Tue Apr 3 22:03:02 2012
@@ -81,7 +81,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>