MPANT-21 : "get-deps" target store downloads to the default local maven repository (${user.home}/.maven/repository).
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@155601 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
958972fc45
commit
b8ed332915
@ -54,7 +54,9 @@
|
||||
<j:set var="baseDirFile" value="${pom.file.canonicalFile.parentFile}"/>
|
||||
<maven:makeRelativePath basedir="${baseDirFile}" path="${maven.build.dir}" separator="/" var="defaulttargetdir"/>
|
||||
<property name="defaulttargetdir" value="${defaulttargetdir}"/>
|
||||
<property name="libdir" value="${defaulttargetdir}/lib" />
|
||||
<!--<property name="libdir" value="${defaulttargetdir}/lib" />-->
|
||||
<property name="libdir" value="$${user.home}/.maven/repository" />
|
||||
|
||||
|
||||
<maven:makeRelativePath basedir="${baseDirFile}" path="${maven.build.dest}" separator="/" var="classesdir"/>
|
||||
<property name="classesdir" value="${classesdir}" />
|
||||
@ -79,9 +81,10 @@
|
||||
<property name="proxy.password" value="$${maven.proxy.password}"/>
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="$${libdir}" >
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
<j:forEach var="lib" items="${pom.artifacts}">
|
||||
<j:set var="dep" value="${lib.dependency}"/>
|
||||
<pathelement location="$${libdir}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"/>
|
||||
</j:forEach>
|
||||
</path>
|
||||
|
||||
<target
|
||||
@ -364,24 +367,25 @@
|
||||
|
||||
<j:forEach var="lib" items="${pom.artifacts}">
|
||||
<maven:makeRelativePath var="relativePath" basedir="${maven.repo.local}" path="${lib.path}" separator="/"/>
|
||||
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
|
||||
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
|
||||
<j:set var="dep" value="${lib.dependency}"/>
|
||||
<mkdir dir="$${libdir}/${dep.artifactDirectory}/${dep.type}s/"/>
|
||||
<j:choose>
|
||||
<j:when test="${checkExist.exists()}">
|
||||
<j:set var="dep" value="${lib.dependency}"/>
|
||||
<!-- note: this is a valid use of artifactDirectory -->
|
||||
<j:set var="url" value="${repo}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"/>
|
||||
<property name="${dep.artifactId}.jar" value="${url}"/>
|
||||
<j:set var="get.src" value="$${${dep.artifactId}.jar}"/>
|
||||
<get
|
||||
src="${get.src}"
|
||||
dest="$${libdir}/${dep.artifact}"
|
||||
dest="$${libdir}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"
|
||||
usetimestamp="true"
|
||||
ignoreerrors="true"
|
||||
/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<maven:makeRelativePath var="relativePath" basedir="${basedir}" path="${lib.path}" separator="/"/>
|
||||
<copy todir="$${libdir}" file="${relativePath}"/>
|
||||
<maven:makeRelativePath var="relativePath" basedir="${basedir}" path="${lib.path}" separator="/"/>
|
||||
<copy tofile="$${libdir}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}" file="${relativePath}"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:forEach>
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
# Test MPANT-20
|
||||
maven-jaxb-plugin.jar=http://ovh.dl.sourceforge.net/sourceforge/maven-plugins/maven-jaxb-plugin-1.0.jar
|
||||
maven-jaxb-plugin.jar=http://ovh.dl.sourceforge.net/sourceforge/maven-plugins/maven-jaxb-plugin-1.0.jar
|
||||
# For maven users it is better to use the real repository and not the default one.
|
||||
libdir=${maven.repo.local}
|
||||
@ -33,78 +33,79 @@
|
||||
</ol>
|
||||
<p>If this property is setted to false the generated build file doesn't load this properties, so it will help you to avoid conflicts.</p>
|
||||
<p>The following properties are defined in the build files and thus can be overridden in the files described previously : </p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Property name</th>
|
||||
<th>Description</th>
|
||||
<th>Default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaulttargetdir</td>
|
||||
<td>The directory where the generated files are stored</td>
|
||||
<td>${basedir}/target</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>libdir</td>
|
||||
<td>The directory where are downloaded dependencies</td>
|
||||
<td>${basedir}/target/lib</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>classesdir</td>
|
||||
<td>The directory where compiled classes are stored</td>
|
||||
<td>${basedir}/target/classes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>testclassesdir</td>
|
||||
<td>The directory where compiled classes for unit tests are stored (only if there are unit tests classes in your project)</td>
|
||||
<td>${basedir}/target/test-classes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>testreportdir</td>
|
||||
<td>The directory where tests reports are stored (only if there are unit tests classes in your project)</td>
|
||||
<td>${basedir}/target/test-reports</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>distdir</td>
|
||||
<td>The directory where the distribution is created</td>
|
||||
<td>${basedir}/dist</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>javadocdir</td>
|
||||
<td>The directory where is stored the javadoc</td>
|
||||
<td>${basedir}/dist/docs/api</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>final.name</td>
|
||||
<td>The name used for the generated jar</td>
|
||||
<td>${maven.final.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i>${dep.artifactId}</i>.jar</td>
|
||||
<td>A property is created for each project's dependency (for example : <code>activation.jar</code>). This property can be used to override the default url used to download the dependency (for example : <code>activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar</code>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.host</td>
|
||||
<td>The proxy host used to download dependencies.</td>
|
||||
<td>${maven.proxy.host}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.port</td>
|
||||
<td>The proxy port.</td>
|
||||
<td>${maven.proxy.port}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.username</td>
|
||||
<td>The username used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||
<td>${maven.proxy.username}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.password</td>
|
||||
<td>The password used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||
<td>${maven.proxy.password}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Property name</th>
|
||||
<th>Description</th>
|
||||
<th>Default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaulttargetdir</td>
|
||||
<td>The directory where the generated files are stored</td>
|
||||
<td>${basedir}/target</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>libdir</td>
|
||||
<td>The directory where are downloaded dependencies (default maven local repository). If you prefer you can use something like <code>${defaulttargetdir}/lib</code>.</td>
|
||||
<td>${user.home}/.maven/repository</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>classesdir</td>
|
||||
<td>The directory where compiled classes are stored</td>
|
||||
<td>${basedir}/target/classes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>testclassesdir</td>
|
||||
<td>The directory where compiled classes for unit tests are stored (only if there are unit tests classes in your project)</td>
|
||||
<td>${basedir}/target/test-classes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>testreportdir</td>
|
||||
<td>The directory where tests reports are stored (only if there are unit tests classes in your project)</td>
|
||||
<td>${basedir}/target/test-reports</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>distdir</td>
|
||||
<td>The directory where the distribution is created</td>
|
||||
<td>${basedir}/dist</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>javadocdir</td>
|
||||
<td>The directory where is stored the javadoc</td>
|
||||
<td>${basedir}/dist/docs/api</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>final.name</td>
|
||||
<td>The name used for the generated jar</td>
|
||||
<td>${maven.final.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<i>${dep.artifactId}</i>.jar</td>
|
||||
<td>A property is created for each project's dependency (for example : <code>activation.jar</code>). This property can be used to override the default url used to download the dependency (for example : <code>activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar</code>)</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.host</td>
|
||||
<td>The proxy host used to download dependencies.</td>
|
||||
<td>${maven.proxy.host}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.port</td>
|
||||
<td>The proxy port.</td>
|
||||
<td>${maven.proxy.port}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.username</td>
|
||||
<td>The username used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||
<td>${maven.proxy.username}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>proxy.password</td>
|
||||
<td>The password used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||
<td>${maven.proxy.password}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</subsection>
|
||||
<subsection name="Targets">
|
||||
<p>The main targets defined in the generated ant's buildfile are : </p>
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
<action dev="aheritier" type="add" issue="MPANT-20" due-to="Dennis Lundberg">Allow URL substitutions in generated build.xml files.</action>
|
||||
<action dev="aheritier" type="add">Ant user can set proxy settings.</action>
|
||||
<action dev="aheritier" type="add">New property maven.ant.compatibility if you want a script compatible with ant 1.5 (actually for proxy settings).</action>
|
||||
<action dev="aheritier" type="update" issue="MPANT-21">"get-deps" target store downloads to the default local maven repository (<i>${user.home}/.maven/repository</i>).</action>
|
||||
</release>
|
||||
<release version="1.8.1" date="2004-08-20">
|
||||
<action dev="carlos" type="fix" issue="MPANT-16">Use relative paths in test resources filesets.</action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user