mirror of https://github.com/apache/archiva.git
[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
This commit is contained in:
parent
9d998d14c9
commit
fa10e63f5c
|
@ -55,6 +55,20 @@ public class ArtifactExtensionMapping
|
||||||
typeToExtensionMap.put( MAVEN_PLUGIN, "jar" );
|
typeToExtensionMap.put( MAVEN_PLUGIN, "jar" );
|
||||||
typeToExtensionMap.put( MAVEN_ONE_PLUGIN, "jar" );
|
typeToExtensionMap.put( MAVEN_ONE_PLUGIN, "jar" );
|
||||||
typeToExtensionMap.put( MAVEN_ARCHETYPE, "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 )
|
public static String getExtension( String type )
|
||||||
|
@ -62,7 +76,7 @@ public class ArtifactExtensionMapping
|
||||||
// Try specialized types first.
|
// Try specialized types first.
|
||||||
if ( typeToExtensionMap.containsKey( type ) )
|
if ( typeToExtensionMap.containsKey( type ) )
|
||||||
{
|
{
|
||||||
return (String) typeToExtensionMap.get( type );
|
return typeToExtensionMap.get( type );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return type
|
// Return type
|
||||||
|
@ -118,6 +132,26 @@ public class ArtifactExtensionMapping
|
||||||
{
|
{
|
||||||
return "distribution-zip";
|
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;
|
return defaultExtension;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue