Fix artifact download for artifact type different of jar

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163448 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-03-02 13:40:00 +00:00
parent c7f03630d9
commit f57388bd2a
1 changed files with 15 additions and 3 deletions

View File

@ -937,7 +937,7 @@ public class MBoot
private String getArtifactPath( Dependency d, String pathSeparator )
{
return d.getArtifactDirectory() + pathSeparator + "jars" + pathSeparator + d.getArtifact();
return d.getArtifactDirectory() + pathSeparator + d.getType() + "s" + pathSeparator + d.getArtifact();
}
class ModelReader
@ -1344,14 +1344,26 @@ public class MBoot
return jar;
}
String artifact;
if ( isValid( getArtifactId() ) )
{
return getArtifactId() + "-" + getVersion() + "." + getType();
artifact = getArtifactId() + "-" + getVersion() + ".";
}
else
{
return getId() + "-" + getVersion() + "." + getType();
artifact = getId() + "-" + getVersion() + ".";
}
if ( "jar".equals( getType() ) || "plugin".equals( getType() ) )
{
artifact += "jar";
}
else
{
artifact += getType();
}
return artifact;
}
public void setVersion( String version )