You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/09/09 11:20:35 UTC
svn commit: r1382432 - in /lucene/dev/branches/branch_4x: ./ build.xml
extra-targets.xml
Author: uschindler
Date: Sun Sep 9 09:20:35 2012
New Revision: 1382432
URL: http://svn.apache.org/viewvc?rev=1382432&view=rev
Log:
Merged revision(s) 1382431 from lucene/dev/trunk:
Allow running nightly Jenkins Maven build from a single ANT target. This automatically downloads the Internet (sorry, the correct Maven version 2.2.1, of course) to do this - no need to install Maven at all: ant run-maven-build
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/build.xml
lucene/dev/branches/branch_4x/extra-targets.xml
Modified: lucene/dev/branches/branch_4x/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/build.xml?rev=1382432&r1=1382431&r2=1382432&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/build.xml (original)
+++ lucene/dev/branches/branch_4x/build.xml Sun Sep 9 09:20:35 2012
@@ -110,6 +110,8 @@
<property name="version" value="4.0-SNAPSHOT"/>
<property name="maven-build-dir" value="maven-build"/>
+ <property name="maven-version" value="2.2.1"/>
+
<target name="get-maven-poms"
description="Copy Maven POMs from dev-tools/maven/ to ${maven-build-dir}/">
<copy todir="${maven-build-dir}" overwrite="true">
@@ -149,6 +151,25 @@
<fileset dir="solr" includes="build.xml"/>
</subant>
</target>
+
+ <target name="run-maven-build" depends="get-maven-poms" description="Runs the Maven build using automatically generated POMs">
+ <subant target="run-maven-build" inheritall="false" failonerror="true">
+ <propertyset>
+ <propertyref prefix="maven-"/>
+ </propertyset>
+ <fileset dir="." includes="extra-targets.xml" />
+ </subant>
+ </target>
+
+ <target name="remove-maven-artifacts" description="Removes all Lucene/Solr Maven artifacts from the local repository">
+ <echo message="Removing all Lucene/Solr Maven artifacts from '${user.home}/.m2/repository'..."/>
+ <delete includeemptydirs="true">
+ <fileset dir="${user.home}/.m2/repository">
+ <include name="org/apache/lucene/**"/>
+ <include name="org/apache/solr/**"/>
+ </fileset>
+ </delete>
+ </target>
<target name="eclipse" depends="clean-jars, resolve" description="Setup Eclipse configuration">
<copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false"/>
@@ -225,7 +246,7 @@
<property name="fakeReleaseTmp" value="lucene/build/fakeReleaseTmp"/>
<property name="fakeReleaseVersion" value="4.0"/> <!-- *not* -SNAPSHOT, the real version -->
- <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it." depends="clean">
+ <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean">
<sequential>
<fail unless="JAVA6_HOME">JAVA6_HOME property is not defined.</fail>
<fail unless="JAVA7_HOME">JAVA7_HOME property is not defined.</fail>
@@ -279,9 +300,9 @@
</target>
<!-- Jenkins tasks -->
- <target name="jenkins-hourly" depends="clean,test,validate,-jenkins-javadocs-lint,check-svn-working-copy"/>
+ <target name="jenkins-hourly" depends="clean,test,validate,-jenkins-javadocs-lint,check-svn-working-copy" description="Runs the Jenkins hourly test runs"/>
- <target name="jenkins-clover">
+ <target name="jenkins-clover" description="Runs nightly clover builds on Jenkins">
<antcall target="-jenkins-clover">
<param name="run.clover" value="true"/>
<!-- must be 1, as clover does not like parallel test runs: -->
@@ -295,7 +316,8 @@
</target>
<target name="-jenkins-clover" depends="clean,test,generate-clover-reports"/>
- <target name="jenkins-maven-nightly" depends="clean,generate-maven-artifacts,validate-maven-dependencies"/>
+ <target name="jenkins-maven-nightly" depends="clean,remove-maven-artifacts,run-maven-build,generate-maven-artifacts,validate-maven-dependencies"
+ description="Runs the nightly Maven build on Jenkins, including artifact deployment"/>
<!-- we need this extra condition, as we want to match only on "true", not solely if property is set: -->
<property name="disable.javadocs-lint" value="false" />
Modified: lucene/dev/branches/branch_4x/extra-targets.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/extra-targets.xml?rev=1382432&r1=1382431&r2=1382432&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/extra-targets.xml (original)
+++ lucene/dev/branches/branch_4x/extra-targets.xml Sun Sep 9 09:20:35 2012
@@ -51,6 +51,14 @@
<echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo>
</target>
+ <target name="run-maven-build" depends="install-maven-tasks">
+ <mvn xmlns="antlib:org.apache.maven.artifact.ant" pom="${maven-build-dir}/pom.xml"
+ mavenVersion="${maven-version}" failonerror="true" fork="true">
+ <arg value="-fae"/>
+ <arg value="install"/>
+ </mvn>
+ </target>
+
<target xmlns:ivy="antlib:org.apache.ivy.ant" name="check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure">
<ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="1.7.5-v1"
inline="true" conf="default" type="jar" transitive="true" pathid="svnkit.classpath"/>