From 780176f7f54e33b1f1b0663248fc273c1236ccf9 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Wed, 10 Mar 2010 04:02:48 +0000 Subject: [PATCH] [MRM-1360] move type population into Maven 2 plugin git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@921224 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/ArtifactExtensionMapping.java | 53 ++++++++----- .../1.0-SNAPSHOT/maven-metadata.xml | 6 +- .../1.0-SNAPSHOT/maven-metadata.xml.md5 | 2 +- .../1.0-SNAPSHOT/maven-metadata.xml.sha1 | 2 +- ...artifact-1.0-20100310.014828-2-javadoc.jar | Bin 0 -> 20221 bytes ...fact-1.0-20100310.014828-2-javadoc.jar.md5 | 1 + ...act-1.0-20100310.014828-2-javadoc.jar.sha1 | 1 + ...artifact-1.0-20100310.014828-2-sources.jar | Bin 0 -> 637 bytes ...fact-1.0-20100310.014828-2-sources.jar.md5 | 1 + ...act-1.0-20100310.014828-2-sources.jar.sha1 | 1 + .../test-artifact-1.0-20100310.014828-2.jar | Bin 0 -> 2124 bytes ...est-artifact-1.0-20100310.014828-2.jar.md5 | 1 + ...st-artifact-1.0-20100310.014828-2.jar.sha1 | 1 + .../test-artifact-1.0-20100310.014828-2.pom | 24 ++++++ ...est-artifact-1.0-20100310.014828-2.pom.md5 | 1 + ...st-artifact-1.0-20100310.014828-2.pom.sha1 | 1 + .../test/test-artifact/maven-metadata.xml | 3 +- .../test/test-artifact/maven-metadata.xml.md5 | 2 +- .../test-artifact/maven-metadata.xml.sha1 | 2 +- .../maven2/ArtifactMappingProvider.java | 25 ++++++ .../DefaultArtifactMappingProvider.java | 50 ++++++++++++ .../Maven2RepositoryPathTranslator.java | 45 ++++++++--- .../Maven2RepositoryMetadataResolverTest.java | 75 ++++++++++++++++-- 23 files changed, 251 insertions(+), 46 deletions(-) create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-javadoc.jar create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-javadoc.jar.md5 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-javadoc.jar.sha1 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.md5 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.sha1 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.jar create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.jar.md5 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.jar.sha1 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.md5 create mode 100644 archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.sha1 create mode 100644 archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/ArtifactMappingProvider.java create mode 100644 archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ArtifactExtensionMapping.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ArtifactExtensionMapping.java index d4f70fb8f..6f235cc76 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ArtifactExtensionMapping.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ArtifactExtensionMapping.java @@ -19,6 +19,9 @@ package org.apache.maven.archiva.repository.content; * under the License. */ +import org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProvider; +import org.apache.archiva.metadata.repository.storage.maven2.DefaultArtifactMappingProvider; + import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; @@ -40,21 +43,28 @@ public class ArtifactExtensionMapping private static final Pattern mavenPluginPattern = Pattern.compile( "^(maven-.*-plugin)|(.*-maven-plugin)$" ); + // TODO: won't support extensions - need to refactor away this class + private static final ArtifactMappingProvider mapping = new DefaultArtifactMappingProvider(); + static { typeToExtensionMap = new HashMap(); typeToExtensionMap.put( "ejb-client", "jar" ); typeToExtensionMap.put( "ejb", "jar" ); + typeToExtensionMap.put( "java-source", "jar" ); + typeToExtensionMap.put( "javadoc", "jar" ); + typeToExtensionMap.put( "test-jar", "jar" ); + typeToExtensionMap.put( MAVEN_PLUGIN, "jar" ); + + typeToExtensionMap.put( MAVEN_ARCHETYPE, "jar" ); + + // TODO: move to maven 1 plugin + typeToExtensionMap.put( MAVEN_ONE_PLUGIN, "jar" ); + typeToExtensionMap.put( "javadoc.jar", "jar" ); + typeToExtensionMap.put( "uberjar", "jar" ); typeToExtensionMap.put( "distribution-tgz", "tar.gz" ); typeToExtensionMap.put( "distribution-zip", "zip" ); - typeToExtensionMap.put( "java-source", "jar" ); - typeToExtensionMap.put( "javadoc.jar", "jar" ); - typeToExtensionMap.put( "javadoc", "jar" ); typeToExtensionMap.put( "aspect", "jar" ); - typeToExtensionMap.put( "uberjar", "jar" ); - typeToExtensionMap.put( MAVEN_PLUGIN, "jar" ); - typeToExtensionMap.put( MAVEN_ONE_PLUGIN, "jar" ); - typeToExtensionMap.put( MAVEN_ARCHETYPE, "jar" ); } public static String getExtension( String type ) @@ -62,7 +72,7 @@ public class ArtifactExtensionMapping // Try specialized types first. if ( typeToExtensionMap.containsKey( type ) ) { - return (String) typeToExtensionMap.get( type ); + return typeToExtensionMap.get( type ); } // Return type @@ -88,36 +98,37 @@ public class ArtifactExtensionMapping public static String mapExtensionAndClassifierToType( String classifier, String extension, String defaultExtension ) { - if ( "sources".equals( classifier ) ) + String value = mapping.mapClassifierAndExtensionToType( classifier, extension ); + if ( value == null ) { - return "java-source"; + value = mapToMaven1Type( extension ); } - else if ( "javadoc".equals( classifier ) ) - { - return "javadoc"; - } - return mapExtensionToType( extension, defaultExtension ); + return value != null ? value : defaultExtension; } public static String mapExtensionToType( String extension ) { - return mapExtensionToType( extension, extension ); + String value = mapToMaven1Type( extension ); + + return value != null ? value : extension; } - private static String mapExtensionToType( String extension, String defaultExtension ) + private static String mapToMaven1Type( String extension ) { + // TODO: Maven 1 plugin + String value = null; if ( "tar.gz".equals( extension ) ) { - return "distribution-tgz"; + value = "distribution-tgz"; } else if ( "tar.bz2".equals( extension ) ) { - return "distribution-bzip"; + value = "distribution-bzip"; } else if ( "zip".equals( extension ) ) { - return "distribution-zip"; + value = "distribution-zip"; } - return defaultExtension; + return value; } } diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml index 89f58d525..dee64e3fe 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml @@ -5,9 +5,9 @@ 1.0-SNAPSHOT - 20100308.230825 - 1 + 20100310.014828 + 2 - 20100308230825 + 20100310014828 diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.md5 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.md5 index d774a5365..4ce347dc1 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.md5 +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.md5 @@ -1 +1 @@ -7210867ac16cd955db89cfca699e7c96 \ No newline at end of file +aad6835e3e7a4a9de5318ce9183eab54 \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.sha1 index 0e44079af..9318aa84b 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.sha1 +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/maven-metadata.xml.sha1 @@ -1 +1 @@ -271faeb2039d026ee6a3c937375b5ff7d4b1d605 \ No newline at end of file +73669371dc2fdae2fa9a129932ed0932d62d9e6b \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-javadoc.jar b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-javadoc.jar new file mode 100644 index 0000000000000000000000000000000000000000..5aab069ab7e8ac298ae52544f6c557702465389c GIT binary pat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>4+JPdS(9)tH;Vhqm~qX6tt@YWc#~(&QXBt`nRA=_fT%x`Uki0H5$Bw(EpI zX}s&j;`AQyHEuVS0*XBb<_pDL~RHOsROnr3Vle=Cuo z-L^;7U0_%-hRh#)c6F-fY|tf<`f}!f5lfuIV~2I`jLi4e)oxzODB3kqqcv94%Lk~FM*VBp2OtJSO{ z0sag=e$GKF+TWhb;q|Wtt@;dXb#c{g==o@W;5ZzF8$7x`Wsd!gf052l<6loPdhH^P z3IW>A;j8S6kCNskh@MW1bsg!4%d@M_oQIL zkaFb(##S=eZ8=@(r54*e_KC~pHs_@~WR0&slG@fttoEHsgLfn%=f@dx<^C%_Rj)-D z!w*kw7NoBExl2er%gEv3RDSi9E%#o6G5JoBQdY|#naSFMhL)S|p97eHu@GpS2Nv`x z+g))?JFp*qd2k>T2FVD(9k%0ANDoMP?Pm-Nl zi>fYz&jhRuQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYBg5*eCa8j%)?X4%gZBbBE!v96eMc%dD2&t%AFNE8DP#}V5mq% zbuBB<86~O3B}gs>DN#5n%H0B#S`Ng#FeQ!!1$tSDWr@1I8~F|y2snTL&2_mmEyI3+ zuyi#$+Yy0F8eJZ$PnKvv7%~#Zs1E0xtjS6VD2rf1!TnmcDz>oWGCOnZJ0$b&Ko$)cMEC6Rpb&pXzZQ zca%E2uX^Qf-dhVVN#}lH4e(}U5@E(213)(efdIo>M-Yt^A24m$V+5oa1eP?a14+0x yr1(L$7+YY1wSz5Q2V_En7GWv2z=dc5S$Yws1s2o+-mGjOX%--S4x}3xK|BDAQ=l0D literal 0 HcmV?d00001 diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.md5 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.md5 new file mode 100644 index 000000000..35b216fdb --- /dev/null +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.md5 @@ -0,0 +1 @@ +a47f0edab0271fc55a3db38098f5f78a \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.sha1 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.sha1 new file mode 100644 index 000000000..818b1e1df --- /dev/null +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2-sources.jar.sha1 @@ -0,0 +1 @@ +af4c914ef8f80be2a8241fb4d40cff11f4348c0f \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.jar b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.jar new file mode 100644 index 0000000000000000000000000000000000000000..3176aff718a17ae644d9f75bdc38d3cedef6512a GIT binary patch literal 2124 zcmWIWW@h1H0D+0ASvFt>l;8x?zOEsTx}JV+`TRsgZ*3~+9=KSU$gDb`lo)+nNojal9t?R_W{$xqm6fx}s zDiu5DbO#B02L+eR)mkee!!0z~I7qZc_;k=`pp2JsvDbk|o~|oZRRtPFV%JZ}neZ~L zitS_Dvpq3;Vi;iVVgS1f=oC0$1+q#~i%Za){`}aKUw(`X4BSi%416#pjs*pJ$vKI| z#kqmL-iI9oYHzRiP1>?`>(}UL|IiCEwjnHnN1Ou|2Jz3^_BLpH&ZJ3sto766L~MRA z{|S7gvQ}ha^^D_tW>)@A`~Lg+XYNRu#|Io4v&~kmh>R%T(CFKz+n3vRXeQTG%k&dw z{MI}>Pp{CI?Apim^sLH@Q$ONLObt`*Uvb_Q-01a5a;C9=)|m%C-1>UU4W+hraJO(t zW}S7f*O=G3+|}a4Ew!+R3#Q&vc*J-%L~M%ZN?G4W^Y#RF?s9EX_ngel*PVR)sNOe; zJJ~BsL+U${?&cS~*}Y=1Q39sUpx8DVPJ7d4XtA0ndwi(5s`zQw)lY|4^LaU ziDjvI@MywJhzgjBlk;=+QY#X33vyERP$C&qw;mC?K}P5%7L{bCB_<;$m>ytSPrY-( zCJUHgG?^I~Oi4DY0O-()+??Lv*z9Hlk=pm`1#YhHjQwq(BK&Qe<8CplWB0tI@^h_x zorLU<-Kd`*7+o50WA^ts#l`13y{1e{Pq?=Fv(F6o|0!#`49;b8G6lNcdX>}FMOW{(Ka{Co6TUmma5$sAL*Coo^+aJQ~8BumbQ8P3KdP3fvZv%#!Z@WQpVA@cq-$j1f7H8 z$5yV`_QzvpuA4jC^qCI?AGi1}^Pg2T@mTsQPB}OCX?x$xv>tr-HFJ0My*+|4eU~_9 z9gc4oD^6Ls`NuI{fj1uNUJi{O4hDS37?WSDW_DY9zV*T7Rl2rXSGAX!MqgC@&Sbmb z=Mpz>X|>Sntq3I4EdaMfh;H%?(_Hhs&`==V=ZV?_{ z5uV;PK0a%DdPQTJokep9N~EZP{EM3`}x%|Pz}fdIo>M-UD7 z8A2QOvKpiq1eP?a14+0xq>>w90`^iBtQ~CeejpQ?{a|i|Sc+cCLbQM^eFW12FLRNt z!&XiptcwAb*>DHLN)4FBm^ohoW-HjOotT<2q931AK;;MofP(xu5vHLgCWP4>4A{yQ znCVLzg@Gjvnl~|AifT5rltH!v6q4wvA7RA>7ILgW + 4.0.0 + com.example.test + test-artifact + jar + 1.0-SNAPSHOT + test-artifact + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + + + test + file:${basedir}/repository + + + diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.md5 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.md5 new file mode 100644 index 000000000..78a9c2695 --- /dev/null +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.md5 @@ -0,0 +1 @@ +0612c49b1ac80983bfda08616330a4b8 \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.sha1 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.sha1 new file mode 100644 index 000000000..f2385b6e2 --- /dev/null +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100310.014828-2.pom.sha1 @@ -0,0 +1 @@ +156d6062060743bf28df306e067914d3d692b571 \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml index 2678fa1dc..2eee6af0d 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml @@ -4,9 +4,10 @@ test-artifact 1.0-SNAPSHOT + 1.0-SNAPSHOT 1.0-SNAPSHOT - 20100308230825 + 20100310014828 diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.md5 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.md5 index 3dff69b48..c92cd8c2d 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.md5 +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.md5 @@ -1 +1 @@ -93afaac7340faadc7efd097952d79fa4 \ No newline at end of file +4c0a7072d66cfe2deebd3eb998332ccb \ No newline at end of file diff --git a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.sha1 b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.sha1 index 1ff7fb544..5835051b4 100644 --- a/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.sha1 +++ b/archiva-modules/metadata/test-repository/src/main/resources/com/example/test/test-artifact/maven-metadata.xml.sha1 @@ -1 +1 @@ -d59d588343d61fd7d838984a0daa4aaa2546bf9d \ No newline at end of file +64c28127c4923ff352021bdfdad448d2d881ef3b \ No newline at end of file diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/ArtifactMappingProvider.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/ArtifactMappingProvider.java new file mode 100644 index 000000000..b53bbdc19 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/ArtifactMappingProvider.java @@ -0,0 +1,25 @@ +package org.apache.archiva.metadata.repository.storage.maven2; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public interface ArtifactMappingProvider +{ + String mapClassifierAndExtensionToType( String classifier, String ext ); +} diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java new file mode 100644 index 000000000..88048e9b8 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java @@ -0,0 +1,50 @@ +package org.apache.archiva.metadata.repository.storage.maven2; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.HashMap; +import java.util.Map; + +/** + * @plexus.component role="org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProvider" role-hint="default" + */ +public class DefaultArtifactMappingProvider + implements ArtifactMappingProvider +{ + private final Map classifierAndExtensionToTypeMap; + + public DefaultArtifactMappingProvider() + { + classifierAndExtensionToTypeMap = new HashMap(); + + // Maven 2.2.1 supplied types (excluding defaults where extension == type and no classifier) + classifierAndExtensionToTypeMap.put( "client:jar", "ejb-client" ); + classifierAndExtensionToTypeMap.put( "sources:jar", "java-source" ); + classifierAndExtensionToTypeMap.put( "javadoc:jar", "javadoc" ); + classifierAndExtensionToTypeMap.put( "tests:jar", "test-jar" ); + } + + public String mapClassifierAndExtensionToType( String classifier, String ext ) + { + classifier = classifier != null ? classifier : ""; + ext = ext != null ? ext : ""; + return classifierAndExtensionToTypeMap.get( classifier + ":" + ext ); + } +} diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java index e96fabfa3..2ff02478f 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java @@ -1,13 +1,5 @@ package org.apache.archiva.metadata.repository.storage.maven2; -import org.apache.archiva.metadata.model.ArtifactMetadata; -import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; -import org.apache.maven.archiva.common.utils.VersionUtil; - -import java.io.File; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -27,6 +19,15 @@ import java.util.regex.Pattern; * under the License. */ +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; +import org.apache.maven.archiva.common.utils.VersionUtil; + +import java.io.File; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * @plexus.component role="org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator" role-hint="maven2" */ @@ -39,6 +40,11 @@ public class Maven2RepositoryPathTranslator private static final Pattern TIMESTAMP_PATTERN = Pattern.compile( "([0-9]{8}.[0-9]{6})-([0-9]+).*" ); + /** + * @plexus.requirement role="org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProvider" + */ + private List artifactMappingProviders; + public File toFile( File basedir, String namespace, String projectId, String projectVersion, String filename ) { return new File( basedir, toPath( namespace, projectId, projectVersion, filename ) ); @@ -180,6 +186,8 @@ public class Maven2RepositoryPathTranslator m.matches(); String timestamp = m.group( 1 ); String buildNumber = m.group( 2 ); + facet.setTimestamp( timestamp ); + facet.setBuildNumber( Integer.valueOf( buildNumber ) ); version = idSubStrFromVersion.substring( 0, mainVersionLength ) + timestamp + "-" + buildNumber; } catch ( IllegalStateException e ) @@ -246,8 +254,25 @@ public class Maven2RepositoryPathTranslator metadata.setVersion( version ); facet.setClassifier( classifier ); - // TODO: migrate here from ArtifactExtensionMapping and make extensible -// facet.setType( ); + + // we use our own provider here instead of directly accessing Maven's artifact handlers as it has no way + // to select the correct order to apply multiple extensions mappings to a preferred type + // TODO: this won't allow the user to decide order to apply them if there are conflicts or desired changes - + // perhaps the plugins could register missing entries in configuration, then we just use configuration + // here? + + String type = null; + for ( ArtifactMappingProvider mapping : artifactMappingProviders ) + { + type = mapping.mapClassifierAndExtensionToType( classifier, ext ); + if ( type != null ) + { + break; + } + } + + // use extension as default + facet.setType( type != null ? type : ext ); metadata.addFacet( facet ); return metadata; diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java index b8580eaac..1084bc0f7 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java @@ -133,7 +133,6 @@ public class Maven2RepositoryMetadataResolverTest assertDependency( dependencies.get( 9 ), "easymock", "easymockclassextension", "1.2", "test" ); } - // TODO: test snapshot, rest of artifacts public void testGetArtifactMetadata() throws Exception { @@ -156,8 +155,7 @@ public class Maven2RepositoryMetadataResolverTest assertEquals( 0, facet.getBuildNumber() ); assertNull( facet.getTimestamp() ); assertEquals( "sources", facet.getClassifier() ); - // TODO -// assertEquals( "java-source", facet.getType() ); + assertEquals( "java-source", facet.getType() ); artifactMetadata = artifacts.get( 1 ); assertEquals( "plexus-spring-1.2.jar", artifactMetadata.getId() ); @@ -165,8 +163,7 @@ public class Maven2RepositoryMetadataResolverTest assertEquals( 0, facet.getBuildNumber() ); assertNull( facet.getTimestamp() ); assertNull( facet.getClassifier() ); - // TODO -// assertEquals( "jar", facet.getType() ); + assertEquals( "jar", facet.getType() ); artifactMetadata = artifacts.get( 2 ); assertEquals( "plexus-spring-1.2.pom", artifactMetadata.getId() ); @@ -174,8 +171,72 @@ public class Maven2RepositoryMetadataResolverTest assertEquals( 0, facet.getBuildNumber() ); assertNull( facet.getTimestamp() ); assertNull( facet.getClassifier() ); - // TODO -// assertEquals( "pom", facet.getType() ); + assertEquals( "pom", facet.getType() ); + } + + public void testGetArtifactMetadataSnapshots() + throws Exception + { + Collection testArtifacts = resolver.getArtifacts( TEST_REPO_ID, "com.example.test", + "test-artifact", "1.0-SNAPSHOT" ); + List artifacts = new ArrayList( testArtifacts ); + Collections.sort( artifacts, new Comparator() + { + public int compare( ArtifactMetadata o1, ArtifactMetadata o2 ) + { + return o1.getId().compareTo( o2.getId() ); + } + } ); + + assertEquals( 6, artifacts.size() ); + + ArtifactMetadata artifactMetadata = artifacts.get( 0 ); + assertEquals( "test-artifact-1.0-20100308.230825-1.jar", artifactMetadata.getId() ); + MavenArtifactFacet facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 1, facet.getBuildNumber() ); + assertEquals( "20100308.230825", facet.getTimestamp() ); + assertNull( facet.getClassifier() ); + assertEquals( "jar", facet.getType() ); + + artifactMetadata = artifacts.get( 1 ); + assertEquals( "test-artifact-1.0-20100308.230825-1.pom", artifactMetadata.getId() ); + facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 1, facet.getBuildNumber() ); + assertEquals( "20100308.230825", facet.getTimestamp() ); + assertNull( facet.getClassifier() ); + assertEquals( "pom", facet.getType() ); + + artifactMetadata = artifacts.get( 2 ); + assertEquals( "test-artifact-1.0-20100310.014828-2-javadoc.jar", artifactMetadata.getId() ); + facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 2, facet.getBuildNumber() ); + assertEquals( "20100310.014828", facet.getTimestamp() ); + assertEquals( "javadoc", facet.getClassifier() ); + assertEquals( "javadoc", facet.getType() ); + + artifactMetadata = artifacts.get( 3 ); + assertEquals( "test-artifact-1.0-20100310.014828-2-sources.jar", artifactMetadata.getId() ); + facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 2, facet.getBuildNumber() ); + assertEquals( "20100310.014828", facet.getTimestamp() ); + assertEquals( "sources", facet.getClassifier() ); + assertEquals( "java-source", facet.getType() ); + + artifactMetadata = artifacts.get( 4 ); + assertEquals( "test-artifact-1.0-20100310.014828-2.jar", artifactMetadata.getId() ); + facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 2, facet.getBuildNumber() ); + assertEquals( "20100310.014828", facet.getTimestamp() ); + assertNull( facet.getClassifier() ); + assertEquals( "jar", facet.getType() ); + + artifactMetadata = artifacts.get( 5 ); + assertEquals( "test-artifact-1.0-20100310.014828-2.pom", artifactMetadata.getId() ); + facet = (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID ); + assertEquals( 2, facet.getBuildNumber() ); + assertEquals( "20100310.014828", facet.getTimestamp() ); + assertNull( facet.getClassifier() ); + assertEquals( "pom", facet.getType() ); } private void assertDependency( Dependency dependency, String groupId, String artifactId, String version )