Package org.apache.maven.index.artifact
Class DefaultArtifactPackagingMapper
java.lang.Object
org.apache.maven.index.artifact.DefaultArtifactPackagingMapper
- All Implemented Interfaces:
ArtifactPackagingMapper
@Singleton
@Named
public class DefaultArtifactPackagingMapper
extends Object
implements ArtifactPackagingMapper
A very simple artifact packaging mapper, that has everything for quick-start wired in this class. Also, it takes into
account the "${nexus-work}/conf/packaging2extension-mapping.properties" file into account if found. To override the
"defaults" in this class, simply add lines to properties file with same keys.
- Author:
- cstamas
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetExtensionForPackaging
(String packaging) Returns the extension belonging to given packaging, like "jar" for "jar", "jar" for "ear", etc.protected org.slf4j.Logger
void
setPackaging2extensionMapping
(Map<String, String> packaging2extensionMapping) void
setPropertiesFile
(File propertiesFile) Sets the file to source the user provided mappings from, and resets the mappings, forcing it to reload the file.
-
Field Details
-
MAPPING_PROPERTIES_FILE
- See Also:
-
-
Constructor Details
-
DefaultArtifactPackagingMapper
public DefaultArtifactPackagingMapper()
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger() -
setPropertiesFile
Description copied from interface:ArtifactPackagingMapper
Sets the file to source the user provided mappings from, and resets the mappings, forcing it to reload the file.- Specified by:
setPropertiesFile
in interfaceArtifactPackagingMapper
-
getPackaging2extensionMapping
-
setPackaging2extensionMapping
-
getDefaults
-
getExtensionForPackaging
Description copied from interface:ArtifactPackagingMapper
Returns the extension belonging to given packaging, like "jar" for "jar", "jar" for "ear", etc.- Specified by:
getExtensionForPackaging
in interfaceArtifactPackagingMapper
- Returns:
-