mirror of
https://github.com/apache/maven.git
synced 2025-03-08 01:30:33 +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
maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout
@ -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() );
|
||||
}
|
||||
|
||||
if ( artifactHandler.extension() != null && artifactHandler.extension().length() > 0 )
|
||||
{
|
||||
path.append( '.' ).append( artifactHandler.extension() );
|
||||
}
|
||||
|
||||
return path.toString();
|
||||
}
|
||||
|
7
maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/LegacyRepositoryLayout.java
7
maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/LegacyRepositoryLayout.java
@ -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();
|
||||
@ -57,7 +57,10 @@ public String pathOf( Artifact artifact )
|
||||
path.append( '-' ).append( artifact.getClassifier() );
|
||||
}
|
||||
|
||||
if ( artifactHandler.extension() != null && artifactHandler.extension().length() > 0 )
|
||||
{
|
||||
path.append( '.' ).append( artifactHandler.extension() );
|
||||
}
|
||||
|
||||
return path.toString();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user