2005-04-18 00:12:34 -04:00
|
|
|
<project name="foo" xmlns:artifact="antlib:org.apache.maven.artifact.ant" default="foo">
|
|
|
|
<target name="foo">
|
2005-04-18 03:09:16 -04:00
|
|
|
<!--
|
|
|
|
TODO...
|
|
|
|
- read .m2/settings.xml
|
2005-04-25 08:50:39 -04:00
|
|
|
- get dependencies from a POM
|
2005-04-18 03:09:16 -04:00
|
|
|
-->
|
2005-04-18 00:12:34 -04:00
|
|
|
|
2005-04-18 03:09:16 -04:00
|
|
|
<artifact:localRepository id="local.repository" location="${basedir}/target/local-repo" layout="default"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
|
2005-04-18 03:09:16 -04:00
|
|
|
<artifact:remoteRepository id="deploy.repository" url="file://${basedir}/target/deployment-repo" layout="legacy"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
|
2005-04-18 03:09:16 -04:00
|
|
|
<artifact:pom file="pom.xml" id="maven.project"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
|
2005-05-16 21:04:43 -04:00
|
|
|
<artifact:dependencies pathId="dependency.classpath" filesetId="dependency.fileset">
|
2005-04-18 03:09:16 -04:00
|
|
|
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
|
2005-04-23 11:29:28 -04:00
|
|
|
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-2-SNAPSHOT"/>
|
2005-04-18 03:09:16 -04:00
|
|
|
<localRepository refid="local.repository"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
</artifact:dependencies>
|
|
|
|
|
2005-05-16 21:04:43 -04:00
|
|
|
<copy todir="target/files">
|
|
|
|
<fileset refid="dependency.fileset" />
|
|
|
|
</copy>
|
|
|
|
|
2005-04-25 05:38:53 -04:00
|
|
|
<artifact:install file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
2005-04-18 03:09:16 -04:00
|
|
|
<localRepository refid="local.repository"/>
|
|
|
|
<pom refid="maven.project"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
</artifact:install>
|
|
|
|
|
2005-04-25 05:38:53 -04:00
|
|
|
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
2005-04-18 03:09:16 -04:00
|
|
|
<localRepository refid="local.repository"/>
|
|
|
|
<remoteRepository refid="deploy.repository"/>
|
|
|
|
<pom refid="maven.project"/>
|
|
|
|
</artifact:deploy>
|
|
|
|
|
2005-04-25 05:38:53 -04:00
|
|
|
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
2005-04-18 03:09:16 -04:00
|
|
|
<localRepository refid="local.repository"/>
|
|
|
|
<remoteRepository url="scp://localhost/tmp/deployment-repo">
|
|
|
|
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
|
|
|
|
</remoteRepository>
|
|
|
|
<pom refid="maven.project"/>
|
2005-04-18 00:12:34 -04:00
|
|
|
</artifact:deploy>
|
|
|
|
</target>
|
2005-04-29 02:49:53 -04:00
|
|
|
|
|
|
|
<target name="test-scm">
|
|
|
|
<mkdir dir="target" />
|
|
|
|
|
|
|
|
<pathconvert targetos="unix" property="repo.path.unix">
|
|
|
|
<map from="c:" to=""/>
|
|
|
|
<path>
|
|
|
|
<pathelement location="${basedir}/target/deployment-repo-scm" />
|
|
|
|
</path>
|
|
|
|
</pathconvert>
|
|
|
|
|
|
|
|
<property name="scm.url" value="file://${repo.path.unix}" />
|
|
|
|
|
|
|
|
<delete dir="${repo.path.unix}" />
|
|
|
|
|
|
|
|
<exec executable="svnadmin" failonerror="true">
|
|
|
|
<arg line="create ${repo.path.unix}" />
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<artifact:localRepository id="local.repository" location="${basedir}/target/local-repo" layout="default"/>
|
|
|
|
|
|
|
|
<artifact:remoteRepository id="deploy.repository" url="scm:svn:${scm.url}" layout="default"/>
|
|
|
|
|
|
|
|
<artifact:dependencies pathId="dependency.classpath">
|
|
|
|
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
|
|
|
|
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-2-SNAPSHOT"/>
|
|
|
|
<localRepository refid="local.repository"/>
|
|
|
|
</artifact:dependencies>
|
|
|
|
|
|
|
|
<exec executable="svn" dir="${basedir}/target/local-repo" failonerror="true">
|
|
|
|
<arg line="import -m 'import' ${scm.url}" />
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<delete dir="${basedir}/target/local-repo-scm" />
|
|
|
|
|
2005-04-29 05:31:42 -04:00
|
|
|
<!-- Could the SCM provider initialise this? -->
|
|
|
|
<exec executable="svn" dir="${basedir}/target" failonerror="true">
|
|
|
|
<arg line="co ${scm.url} -N local-repo-scm" />
|
|
|
|
</exec>
|
|
|
|
|
2005-04-29 02:49:53 -04:00
|
|
|
<artifact:localRepository id="local.repository.scm" location="${basedir}/target/local-repo-scm" layout="default"/>
|
|
|
|
|
2005-04-29 05:31:42 -04:00
|
|
|
<artifact:dependencies pathId="dependency.classpath.scm">
|
2005-04-29 02:49:53 -04:00
|
|
|
<dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/>
|
|
|
|
<dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0-alpha-2-SNAPSHOT"/>
|
|
|
|
<localRepository refid="local.repository.scm"/>
|
|
|
|
<remoteRepository refid="deploy.repository"/>
|
|
|
|
</artifact:dependencies>
|
|
|
|
|
|
|
|
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
|
|
|
<localRepository refid="local.repository.scm"/>
|
|
|
|
<remoteRepository refid="deploy.repository" />
|
|
|
|
<pom refid="maven.project"/>
|
|
|
|
</artifact:deploy>
|
|
|
|
</target>
|
2005-04-18 00:12:34 -04:00
|
|
|
</project>
|
|
|
|
|