o update the mercury and ant-task based builds

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@756798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-03-20 23:01:03 +00:00
parent ecb1bfe2fd
commit 7b6c7f6ce3
3 changed files with 36 additions and 42 deletions

View File

@ -19,18 +19,18 @@ under the License.
<!-- START SNIPPET: ant-bootstrap
By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration
By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration
repository by specifying a property on the command line:
ant -Dmaven.repo.local=/my/integration/repository
Those familiar with Maven will note this is the same way the local repository can be set from the command-line.
Those familiar with Maven will note this is the same way the local repository can be set from the command-line.
This facilitates having a set of builds converge on the same repository for integration purposes.
END SNIPPET: ant-bootstrap -->
<project default="all" basedir="." xmlns:mercury="urn:mercury-ant-tasks">
<property name="it.workdir.version" value="3.0.x"/>
<target name="initTaskDefs">
@ -57,13 +57,13 @@ END SNIPPET: ant-bootstrap -->
</target>
<target name="init" depends="isMavenHomeSet">
<xmlproperty prefix="pom" file="pom.xml"/>
<xmlproperty prefix="pom" file="pom.xml"/>
<basename file="${maven.home}" property="maven.home.basename"/>
<dirname file="${maven.home}" property="maven.home.dirname"/>
<!-- Initialize properties -->
<property name="maven.home.basename.expected" value="apache-maven-${pom.project.version}"/>
<property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
<property name="maven.repo.central" value="http://repository.sonatype.org/content/groups/public"/>
<!--
<property name="maven.repo.central" value="http://repo1.maven.org/maven2"/>
@ -73,8 +73,8 @@ END SNIPPET: ant-bootstrap -->
<isset property="clean.local.repo"/>
</not>
</condition>
<property name="surefire.useFile" value="true"/>
<property name="surefire.useFile" value="true"/>
<echo>maven.home = ${maven.home}</echo>
</target>
@ -84,11 +84,11 @@ END SNIPPET: ant-bootstrap -->
<target name="clean-local-repo" description="cleans up local repo" unless="do.not.clean.local.repo">
<delete dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}"/>
</target>
<target name="pull" depends="init,clean-local-repo" unless="skip.pull">
<property name="verbose" value="false"/>
<target name="pull" depends="init,clean-local-repo" unless="skip.pull">
<property name="verbose" value="false"/>
<!-- Pull the dependencies that Maven needs to build -->
<copy file="pom.xml" tofile="dependencies.xml"/>
<replace file="${basedir}/dependencies.xml" token="&lt;!--start--&gt;" value="&lt;!--"/>
@ -97,10 +97,10 @@ END SNIPPET: ant-bootstrap -->
<mercury:local-repository location="${maven.repo.local}"/>
<mercury:remote-repository id="central" location="${maven.repo.central}"/>
<property name="tsFormat" value="HH:mm:ss"/>
<tstamp><format property="start.time" pattern="${tsFormat}"/></tstamp>
<property name="tsFormat" value="HH:mm:ss"/>
<tstamp><format property="start.time" pattern="${tsFormat}"/></tstamp>
<!-- classpaths with default names: mercury.classpath, mercury.classpath.test, mercury.classpath.runtime -->
<!-- classpaths with default names: mercury.classpath, mercury.classpath.test, mercury.classpath.runtime -->
<mercury:resolve-dependencies scope="compile">
<mercury:dependency source="maven:${basedir}/dependencies.xml"/>
<mercury:dependency id="org.codehaus.plexus:plexus-component-metadata:${pom.properties.plexusVersion}"/>
@ -108,33 +108,33 @@ END SNIPPET: ant-bootstrap -->
<mercury:exclusions>
<mercury:exclusion id="org.sonatype.mercury:mercury-mp3-cli"/>
<mercury:exclusion id="org.sonatype.mercury:mercury-mp3-delta"/>
<mercury:exclusion id="org.sonatype.mercury:mercury-mp3-api"/>
<mercury:exclusion id="org.sonatype.mercury:mercury-mp3-api"/>
</mercury:exclusions>
</mercury:resolve-dependencies>
<tstamp><format property="stop.time" pattern="${tsFormat}"/></tstamp>
<echo>========================================================================</echo>
<echo>Mercury: start ${start.time}, stop ${stop.time}</echo>
<echo>========================================================================</echo>
<property name="mc" refid="mercury.classpath"/>
<echo>mercury.classpath=${mc}</echo>
<echo>========================================================================</echo>
<!--
<!--
-->
<delete file="${basedir}/dependencies.xml"/>
<delete file="${basedir}/dependencies.xml"/>
<tstamp><format property="modello.start.time" pattern="${tsFormat}"/></tstamp>
<!-- only one named classpath: modello.classpath -->
<mercury:resolve-dependencies pathid="modello.classpath" scope="runtime">
<mercury:dependency id="org.codehaus.modello:modello-maven-plugin:${pom.properties.modelloVersion}"/>
</mercury:resolve-dependencies>
<tstamp><format property="modello.stop.time" pattern="${tsFormat}"/></tstamp>
<tstamp><format property="modello.stop.time" pattern="${tsFormat}"/></tstamp>
<echo>=======================================</echo>
<echo>Modello: start ${modello.start.time}, stop ${modello.stop.time}</echo>
<echo>=======================================</echo>
@ -145,20 +145,20 @@ END SNIPPET: ant-bootstrap -->
<echo>modello.cp=${modello.cp}</echo>
<echo>========================================================================</echo>
-->
</target>
<target name="process-classes" depends="pull" description="generates plexus component metadata.">
<mkdir dir="${basedir}/bootstrap/target"/>
<mkdir dir="${basedir}/bootstrap/target/classes"/>
<path id="maven.classpath">
<pathelement location="bootstrap/target/classes"/>
<path refid="sources"/>
<path refid="mercury.classpath"/>
<path refid="sources"/>
<path refid="mercury.classpath"/>
</path>
<echo>Using plexus version ${pom.properties.plexusVersion}</echo>
<echo>Using plexus version ${pom.properties.plexusVersion}</echo>
<java fork="fork" classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" failonerror="true">
<classpath refid="maven.classpath"/>
<!-- We need to generate component descriptors from the maven-artifact sources which use javadoc annotations. -->
@ -174,8 +174,8 @@ END SNIPPET: ant-bootstrap -->
<arg value="--output"/>
<arg value="${basedir}/bootstrap/target/classes/META-INF/plexus/components.xml"/>
</java>
</target>
</target>
<target name="generate-sources" depends="pull" description="generates Java sources from Modello mdo model files">
<mkdir dir="bootstrap/target"/>
<mkdir dir="bootstrap/target/generated-sources"/>
@ -218,16 +218,16 @@ END SNIPPET: ant-bootstrap -->
</target>
<target name="compile-boot" depends="generate-sources" description="compiles the bootstrap sources">
<path id="sources">
<dirset dir=".">
<include name="bootstrap/target/generated-sources"/>
<include name="*/src/main/*"/>
</dirset>
</path>
<mkdir dir="bootstrap/target/classes"/>
<javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.5" target="1.5" debug="true">
<src refid="sources"/>
<classpath refid="mercury.classpath"/>
@ -245,7 +245,7 @@ END SNIPPET: ant-bootstrap -->
<target name="maven-compile" depends="compile-boot,process-classes" description="compiles Maven using the bootstrap Maven, skipping automated tests">
<java fork="true" classname="org.apache.maven.cli.MavenCli" failonerror="true">
<classpath refid="maven.classpath"/>
<arg value="-e"/>
<arg value="-e"/>
<arg value="-B"/>
<arg value="clean"/>
<arg value="install"/>
@ -254,9 +254,9 @@ END SNIPPET: ant-bootstrap -->
</java>
</target>
<target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
<target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
<echo>
The new Maven distribution was created as part of the MAVEN-COMPILE step, above.
The new Maven distribution was created as part of the MAVEN-COMPILE step, above.
This goal just validates the presence of that distribution.
</echo>
<condition property="build.failed">
@ -279,7 +279,7 @@ END SNIPPET: ant-bootstrap -->
</fileset>
</chmod>
</target>
<target name="all" depends="clean-bootstrap,init,extract-assembly"/>
</project>

View File

@ -90,13 +90,6 @@ END SNIPPET: ant-bootstrap -->
<!-- Pull the dependencies for Modello -->
<artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset" verbose="${verbose}">
<localRepository path="${maven.repo.local}"/>
<!-- TODO: remove when Modello 1.0.1 is released -->
<remoteRepository url="http://repo1.maven.org/" id="central"/>
<remoteRepository url="http://snapshots.repository.codehaus.org/" id="codehaus.snapshots">
<snapshots enabled="true"/>
<releases enabled="false"/>
</remoteRepository>
<!-- /TODO -->
<dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="${pom.properties.modelloVersion}"/>
</artifact:dependencies>
@ -171,6 +164,7 @@ END SNIPPET: ant-bootstrap -->
</macrodef>
<modello file="maven-model/src/main/mdo/maven.mdo" version="4.0.0"/>
<modello file="maven-lifecycle/src/main/mdo/maven-lifecycle.mdo"/>
<modello file="maven-plugin-api/src/main/mdo/lifecycle.mdo"/>
<modello file="maven-project/src/main/mdo/profiles.mdo"/>
<modello file="maven-core/src/main/mdo/settings.mdo"/>