You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2006/03/31 01:54:34 UTC
Re: svn commit: r388412 - /maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
epunzalan@apache.org wrote:
> Author: epunzalan
> Date: Thu Mar 23 22:49:10 2006
> New Revision: 388412
>
> URL: http://svn.apache.org/viewcvs?rev=388412&view=rev
> Log:
> PR: MWAR-7
> Submitted by: Maria Odea Ching
>
> Fixed the bug by adjusting the artifact filename references in case there is an artifact that's named after <finalName>.
It would be good to use finalName instead, but I don't think we have
that capability just yet. Next version :)
> + /**
> + * Converts the filename of an artifact to artifactId-version.type format.
> + *
> + * @param artifact
> + * @return converted filename of the artifact
> + */
> + private String getM2Filename( Artifact artifact )
> + {
> + String filename;
> + if ( !artifact.getFile().getName().equals(
> + artifact.getArtifactId() + "-" + artifact.getVersion() + "." + artifact.getType() ) )
> + {
> + filename = artifact.getArtifactId() + "-" + artifact.getVersion() + "." + artifact.getType();
> + }
> + else
> + {
> + filename = artifact.getFile().getName();
> + }
> + return filename;
> }
This is equivalent to 'artifact.getArtifactId() + "-" +
artifact.getVersion() + "." + artifact.getType();' in every case, so
I'll simplify it.
- Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org