um, not quite :)
1) the equals check is redundant
2) type + classifier is valid
I think its just a simple append of ".${classifier}" if it is not null.
[EMAIL PROTECTED] wrote:
> Author: kenney
> Date: Wed Feb 1 12:56:07 2006
> New Revision: 374170
>
> URL: http://svn.apache.org/viewcvs?rev=374170&view=rev
> Log:
> As per Brett's request, added a check for the classifier. If it's different
> from the artifact type, the classifier will be used in the property name.
>
> Modified:
>
> maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
>
> Modified:
> maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
> URL:
> http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java?rev=374170&r1=374169&r2=374170&view=diff
> ==============================================================================
> ---
> maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
> (original)
> +++
> maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
> Wed Feb 1 12:56:07 2006
> @@ -64,11 +64,14 @@
> for ( Iterator it = artifacts.iterator(); it.hasNext(); )
> {
> Artifact artifact = (Artifact) it.next();
> - log.debug( "Storing: maven.dependency." + artifact.getGroupId() +
> "." +
> - artifact.getArtifactId() + "." + artifact.getType() +
> ".path=" + artifact.getFile().getPath() );
>
> - artifactMap.put( "maven.dependency." + artifact.getGroupId() +
> "." +
> - artifact.getArtifactId() + "." + artifact.getType() +
> ".path", artifact.getFile().getPath() );
> + String key = "maven.dependency." + artifact.getGroupId() + "." +
> artifact.getArtifactId() + "." +
> + ( artifact.getClassifier() == null ||
> artifact.getType().equals( artifact.getClassifier() ) ?
> + artifact.getType() : artifact.getClassifier() ) + ".path";
> +
> + log.debug( "Storing: " + key + "=" +
> artifact.getFile().getPath() );
> +
> + artifactMap.put( key, artifact.getFile().getPath() );
> }
> }
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]