mirror of
https://github.com/apache/maven.git
synced 2025-02-08 11:05:37 +00:00
allow an empty extension
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163890 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08eaf5c94f
commit
cd9f2972af
@ -42,8 +42,8 @@ public String pathOf( Artifact artifact )
|
||||
}
|
||||
catch ( ArtifactHandlerNotFoundException e )
|
||||
{
|
||||
throw new ArtifactPathFormatException( "Cannot find ArtifactHandler for artifact: \'" + artifact.getId()
|
||||
+ "\'.", e );
|
||||
throw new ArtifactPathFormatException( "Cannot find ArtifactHandler for artifact: \'" + artifact.getId() +
|
||||
"\'.", e );
|
||||
}
|
||||
|
||||
StringBuffer path = new StringBuffer();
|
||||
@ -58,7 +58,10 @@ public String pathOf( Artifact artifact )
|
||||
path.append( '-' ).append( artifact.getClassifier() );
|
||||
}
|
||||
|
||||
path.append( '.' ).append( artifactHandler.extension() );
|
||||
if ( artifactHandler.extension() != null && artifactHandler.extension().length() > 0 )
|
||||
{
|
||||
path.append( '.' ).append( artifactHandler.extension() );
|
||||
}
|
||||
|
||||
return path.toString();
|
||||
}
|
||||
|
@ -42,22 +42,25 @@ public String pathOf( Artifact artifact )
|
||||
}
|
||||
catch ( ArtifactHandlerNotFoundException e )
|
||||
{
|
||||
throw new ArtifactPathFormatException( "Cannot find ArtifactHandler for artifact: \'" + artifact.getId()
|
||||
+ "\'.", e );
|
||||
throw new ArtifactPathFormatException( "Cannot find ArtifactHandler for artifact: \'" + artifact.getId() +
|
||||
"\'.", e );
|
||||
}
|
||||
|
||||
StringBuffer path = new StringBuffer();
|
||||
|
||||
path.append(artifact.getGroupId()).append('/');
|
||||
path.append(artifactHandler.directory()).append('/');
|
||||
path.append(artifact.getArtifactId()).append('-').append(artifact.getVersion());
|
||||
path.append( artifact.getGroupId() ).append( '/' );
|
||||
path.append( artifactHandler.directory() ).append( '/' );
|
||||
path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );
|
||||
|
||||
if ( artifact.hasClassifier() )
|
||||
{
|
||||
path.append('-').append(artifact.getClassifier());
|
||||
path.append( '-' ).append( artifact.getClassifier() );
|
||||
}
|
||||
|
||||
path.append('.').append(artifactHandler.extension());
|
||||
if ( artifactHandler.extension() != null && artifactHandler.extension().length() > 0 )
|
||||
{
|
||||
path.append( '.' ).append( artifactHandler.extension() );
|
||||
}
|
||||
|
||||
return path.toString();
|
||||
}
|
||||
@ -69,8 +72,8 @@ public String pathOfMetadata( ArtifactMetadata metadata )
|
||||
|
||||
StringBuffer path = new StringBuffer();
|
||||
|
||||
path.append(artifact.getGroupId()).append("/poms/");
|
||||
path.append(metadata.getFilename());
|
||||
path.append( artifact.getGroupId() ).append( "/poms/" );
|
||||
path.append( metadata.getFilename() );
|
||||
|
||||
return path.toString();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user