Author: hboutemy
Date: Tue Nov 27 11:57:22 2007
New Revision: 598750
URL: http://svn.apache.org/viewvc?rev=598750&view=rev
Log:
[MANTTASKS-33] Pass Ant properties "groupId:artifactId:type[:classifier]" for
resolved dependency files
Modified:
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/sample.build.xml
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
Modified: maven/ant-tasks/branches/maven-ant-tasks-2.0.x/sample.build.xml
URL:
http://svn.apache.org/viewvc/maven/ant-tasks/branches/maven-ant-tasks-2.0.x/sample.build.xml?rev=598750&r1=598749&r2=598750&view=diff
==============================================================================
--- maven/ant-tasks/branches/maven-ant-tasks-2.0.x/sample.build.xml (original)
+++ maven/ant-tasks/branches/maven-ant-tasks-2.0.x/sample.build.xml Tue Nov 27
11:57:22 2007
@@ -140,6 +140,13 @@
</copy>
<available file="target/files/versionMapperFlatten/it" type="dir"
property="snapshot.dependency.flatten.failed"/>
<fail if="snapshot.dependency.flatten.failed">VersionMapper to="flatten"
failed on SNAPSHOT</fail>
+
+ <!-- MANTTASKS-33 -->
+ <available file="${it.ant-tasks:snapshotUniqueTrue:jar}"
property="propertySnapshotUniqueTrue"/>
+ <fail unless="propertySnapshotUniqueTrue">property
it.ant-tasks:snapshotUniqueFalse:jar should point to an existing file</fail>
+
+ <available
file="${org.apache.maven:maven-core-it-support:java-source:sources}"
property="propertySources"/>
+ <fail unless="propertySources">property
org.apache.maven:maven-core-it-support:java-source:sources should point to an
existing file</fail>
</target>
<target name="test-pom-deps" depends="initTaskDefs">
Modified:
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
URL:
http://svn.apache.org/viewvc/maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java?rev=598750&r1=598749&r2=598750&view=diff
==============================================================================
---
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
(original)
+++
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
Tue Nov 27 11:57:22 2007
@@ -228,7 +228,9 @@
fileList.addConfiguredFile( file );
fileSet.createInclude().setName( filename );
-
+
+ getProject().setProperty( artifact.getDependencyConflictId(),
artifact.getFile().getAbsolutePath() );
+
versions.add( artifact.getVersion() );
if ( sourcesFilesetId != null )
@@ -251,6 +253,8 @@
sourcesFileList.addConfiguredFile( sourcesFile );
sourcesFileSet.createInclude().setName(
sourcesFilename );
+
+ getProject().setProperty(
sourcesArtifact.getDependencyConflictId(),
sourcesArtifact.getFile().getAbsolutePath() );
}
catch ( ArtifactResolutionException e )
{
@@ -379,7 +383,7 @@
}
catch ( IOException e )
{
- log( "Unable determine version from Maven Ant Tasks JAR file: " +
e.getMessage(), Project.MSG_WARN );
+ log( "Unable to determine version from Maven Ant Tasks JAR file: "
+ e.getMessage(), Project.MSG_WARN );
}
}
}