From: Brett Porter Date: Sat, 1 Oct 2011 03:44:02 +0000 (+0000) Subject: [MRM-1361] align types to NPanday 1.4.0 X-Git-Tag: archiva-1.4-M1~143 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cd104567e6e7c1dff022b29592ec010f1ba80a1a;p=archiva.git [MRM-1361] align types to NPanday 1.4.0 git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177895 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java b/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java index fa6ad0cb5..f8a60905a 100644 --- a/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java +++ b/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java @@ -31,41 +31,60 @@ import java.util.Map; public class NPandayArtifactMappingProvider implements ArtifactMappingProvider { - private final Map classifierAndExtensionToTypeMap; + private final Map extensionToTypeMap; private final Map typeToExtensionMap; public NPandayArtifactMappingProvider() { - classifierAndExtensionToTypeMap = new HashMap(); + extensionToTypeMap = new HashMap(); // TODO: this could be one of many - we need to look up the artifact metadata from the POM instead // should do this anyway so that plugins don't compete for providing an extension - classifierAndExtensionToTypeMap.put( "dll", "library" ); + extensionToTypeMap.put( "dll", "dotnet-library" ); - classifierAndExtensionToTypeMap.put( "netmodule", "module" ); - classifierAndExtensionToTypeMap.put( "exe", "winexe" ); - classifierAndExtensionToTypeMap.put( "tests:jar", "test-jar" ); + extensionToTypeMap.put( "netmodule", "dotnet-module" ); + extensionToTypeMap.put( "exe", "dotnet-executable" ); typeToExtensionMap = new HashMap(); - typeToExtensionMap.put( "library", "dll" ); + typeToExtensionMap.put( "dotnet-library", "dll" ); + typeToExtensionMap.put( "dotnet-library-config", "dll.config" ); + typeToExtensionMap.put( "dotnet-executable", "exe" ); + typeToExtensionMap.put( "dotnet-executable-config", "exe.config" ); + typeToExtensionMap.put( "dotnet-module", "netmodule" ); + typeToExtensionMap.put( "dotnet-maven-plugin", "dll" ); typeToExtensionMap.put( "asp", "dll" ); + typeToExtensionMap.put( "visual-studio-addin", "dll" ); + typeToExtensionMap.put( "sharp-develop-addin", "dll" ); + typeToExtensionMap.put( "nar", "nar" ); + typeToExtensionMap.put( "dotnet-symbols", "pdb" ); + typeToExtensionMap.put( "ole-type-library", "tlb" ); + typeToExtensionMap.put( "dotnet-vsdocs", "xml" ); + typeToExtensionMap.put( "dotnet-archive", "zip" ); + typeToExtensionMap.put( "dotnet-gac", "dll" ); typeToExtensionMap.put( "gac", "dll" ); - typeToExtensionMap.put( "gac_generic", "dll" ); typeToExtensionMap.put( "gac_msil", "dll" ); + typeToExtensionMap.put( "gac_msil4", "dll" ); typeToExtensionMap.put( "gac_32", "dll" ); + typeToExtensionMap.put( "gac_32_4", "dll" ); + typeToExtensionMap.put( "gac_64", "dll" ); + typeToExtensionMap.put( "gac_64_4", "dll" ); + typeToExtensionMap.put( "com_reference", "dll" ); + + // Legacy types + typeToExtensionMap.put( "library", "dll" ); + typeToExtensionMap.put( "gac_generic", "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" ); + typeToExtensionMap.put( "exe", "exe" ); } public String mapClassifierAndExtensionToType( String classifier, String ext ) { // we don't need classifier - return classifierAndExtensionToTypeMap.get( ext ); + return extensionToTypeMap.get( ext ); } public String mapTypeToExtension( String type )