From fa10e63f5c92b7b7bd0976eb4a6f923d9a2a20e7 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Tue, 8 Jun 2010 10:00:39 +0000 Subject: [PATCH] [MRM-1361] Add support for NPanday artifact types patch created & submitted by brett o add npanday types to artifact extension mapping git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@952596 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/ArtifactExtensionMapping.java | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) 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..49aeabac2 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 @@ -55,6 +55,20 @@ public class ArtifactExtensionMapping typeToExtensionMap.put( MAVEN_PLUGIN, "jar" ); typeToExtensionMap.put( MAVEN_ONE_PLUGIN, "jar" ); typeToExtensionMap.put( MAVEN_ARCHETYPE, "jar" ); + + // NPanday types + typeToExtensionMap.put( "library", "dll" ); + typeToExtensionMap.put( "asp", "dll" ); + typeToExtensionMap.put( "gac", "dll" ); + typeToExtensionMap.put( "gac_generic", "dll" ); + typeToExtensionMap.put( "gac_msil", "dll" ); + typeToExtensionMap.put( "gac_32", "dll" ); + typeToExtensionMap.put( "netplugin", "dll" ); + typeToExtensionMap.put( "visual-studio-addin", "dll" ); + typeToExtensionMap.put( "module", "netmodule" ); + typeToExtensionMap.put( "exe.config", "exe.config" ); + typeToExtensionMap.put( "winexe", "exe" ); + typeToExtensionMap.put( "nar", "nar" ); } public static String getExtension( String type ) @@ -62,7 +76,7 @@ public class ArtifactExtensionMapping // Try specialized types first. if ( typeToExtensionMap.containsKey( type ) ) { - return (String) typeToExtensionMap.get( type ); + return typeToExtensionMap.get( type ); } // Return type @@ -118,6 +132,26 @@ public class ArtifactExtensionMapping { return "distribution-zip"; } + else if ( "dll".equals( extension ) ) + { + return "library"; + } + else if ( "netmodule".equals( extension ) ) + { + return "module"; + } + else if ( "exe.config".equals( extension ) ) + { + return "exe.config"; + } + else if ( "exe".equals( extension ) ) + { + return "winexe"; + } + else if ( "nar".equals( extension ) ) + { + return "nar"; + } return defaultExtension; } } -- 2.39.5