jvanzyl 2004/03/10 14:05:23
Modified: maven-project/src/java/org/apache/maven/artifact
AbstractMavenArtifact.java
Log:
o with the generated model there is no information about artiacts, which is
correct. So now, it is the job of the artifact mechanism to build up the
information about the individual artifact given the dependency information
and the information about the local environment.
Revision Changes Path
1.3 +14 -4
maven-components/maven-project/src/java/org/apache/maven/artifact/AbstractMavenArtifact.java
Index: AbstractMavenArtifact.java
===================================================================
RCS file:
/home/cvs/maven-components/maven-project/src/java/org/apache/maven/artifact/AbstractMavenArtifact.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractMavenArtifact.java 7 Mar 2004 22:40:55 -0000 1.2
+++ AbstractMavenArtifact.java 10 Mar 2004 22:05:23 -0000 1.3
@@ -123,7 +123,17 @@
{
return "/" + getArtifactDirectory( getDependency() )
+ ps + getDependency().getType() + "s"
- + ps + getDependency().getArtifact();
+ + ps + getArtifact( getDependency() );
+ }
+
+ protected String getArtifact( Dependency dependency )
+ {
+ if ( dependency.getArtifact() != null )
+ {
+ return dependency.getArtifact();
+ }
+
+ return dependency.getArtifactId() + "-" + dependency.getVersion() + "." +
dependency.getType();
}
/** @see MavenArtifact#getUrlPath */
@@ -131,7 +141,7 @@
{
return "/" + getArtifactDirectory( getDependency() )
+ "/" + getDependency().getType() + "s"
- + "/" + getDependency().getArtifact();
+ + "/" + getArtifact( getDependency() );
}
/** @see MavenArtifact#getChecksumUrl */
@@ -139,7 +149,7 @@
{
return "/" + getArtifactDirectory( getDependency() )
+ "/" + getDependency().getType() + "s"
- + "/" + getDependency().getArtifact()
+ + "/" + getArtifact( getDependency() )
+ ".md5";
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]