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 Details

  • Constructor Details

    • DefaultArtifactPackagingMapper

      public DefaultArtifactPackagingMapper()
  • Method Details

    • getLogger

      protected org.slf4j.Logger getLogger()
    • setPropertiesFile

      public void setPropertiesFile(File propertiesFile)
      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 interface ArtifactPackagingMapper
      Parameters:
      propertiesFile -
    • getPackaging2extensionMapping

      public Map<String,String> getPackaging2extensionMapping()
    • setPackaging2extensionMapping

      public void setPackaging2extensionMapping(Map<String,String> packaging2extensionMapping)
    • getDefaults

      public Map<String,String> getDefaults()
    • getExtensionForPackaging

      public String getExtensionForPackaging(String packaging)
      Description copied from interface: ArtifactPackagingMapper
      Returns the extension belonging to given packaging, like "jar" for "jar", "jar" for "ear", etc.
      Specified by:
      getExtensionForPackaging in interface ArtifactPackagingMapper
      Parameters:
      packaging -
      Returns: