diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-28 21:37:38 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-28 21:37:38 +0000 |
commit | ddb8a0a59520903b5c2f93e7e35c65bbb24e3140 (patch) | |
tree | 996074809236137bbb5df48898056b1b5fa91c2a | |
parent | 6b77912095c84491cbec88f7b5a67602378306ca (diff) | |
download | archiva-ddb8a0a59520903b5c2f93e7e35c65bbb24e3140.tar.gz archiva-ddb8a0a59520903b5c2f93e7e35c65bbb24e3140.zip |
small hack for packaging maven-plugin in artifact url calculation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177073 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java index 957b22627..a2fef9420 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java @@ -468,12 +468,13 @@ public class NexusRepositorySearch /** * calculate baseUrl without the context and base Archiva Url + * * @param artifactInfo * @return */ protected String getBaseUrl( ArtifactInfo artifactInfo ) { - StringBuilder sb = new StringBuilder( ); + StringBuilder sb = new StringBuilder(); sb.append( '/' ).append( StringUtils.replaceChars( artifactInfo.groupId, '.', '/' ) ); sb.append( '/' ).append( artifactInfo.artifactId ); @@ -484,7 +485,15 @@ public class NexusRepositorySearch { sb.append( '-' ).append( artifactInfo.classifier ); } - sb.append( '.' ).append( artifactInfo.packaging ); + // maven-plugin packaging is a jar + if ( StringUtils.equals( "maven-plugin", artifactInfo.packaging ) ) + { + sb.append( "jar" ); + } + else + { + sb.append( '.' ).append( artifactInfo.packaging ); + } return sb.toString(); } |