java.lang.Object
org.apache.maven.internal.impl.resolver.type.DefaultType
All Implemented Interfaces:
ExtensibleEnum, Type, org.eclipse.aether.artifact.ArtifactType

public class DefaultType extends Object implements Type, org.eclipse.aether.artifact.ArtifactType
Default implementation of Type and Resolver ArtifactType.
Since:
4.0.0
  • Constructor Details

  • Method Details

    • id

      public String id()
      Description copied from interface: Type
      Returns the dependency type id. The id uniquely identifies this dependency type.
      Specified by:
      id in interface ExtensibleEnum
      Specified by:
      id in interface Type
      Returns:
      the id of this type, never null.
    • getId

      public String getId()
      Specified by:
      getId in interface org.eclipse.aether.artifact.ArtifactType
    • getLanguage

      public Language getLanguage()
      Description copied from interface: Type
      Returns the dependency type language.
      Specified by:
      getLanguage in interface Type
      Returns:
      the language of this type, never null.
    • getExtension

      public String getExtension()
      Description copied from interface: Type
      Get the file extension of artifacts of this type.
      Specified by:
      getExtension in interface org.eclipse.aether.artifact.ArtifactType
      Specified by:
      getExtension in interface Type
      Returns:
      the file extension, never null.
    • getClassifier

      public String getClassifier()
      Description copied from interface: Type
      Get the default classifier associated to the dependency type. The default classifier can be overridden when specifying the Dependency.getClassifier().
      Specified by:
      getClassifier in interface org.eclipse.aether.artifact.ArtifactType
      Specified by:
      getClassifier in interface Type
      Returns:
      the default classifier, or null.
    • isIncludesDependencies

      public boolean isIncludesDependencies()
      Description copied from interface: Type
      Specifies if the artifact already embeds its own dependencies. This is the case for JEE packages or similar artifacts such as WARs, EARs, etc.
      Specified by:
      isIncludesDependencies in interface Type
      Returns:
      if the artifact's dependencies are included in the artifact
    • getPathTypes

      public Set<PathType> getPathTypes()
      Description copied from interface: Type
      Types of path (class-path, module-path, …) where the dependency can be placed. For most deterministic builds, the array length should be 1. In such case, the dependency will be unconditionally placed on the specified type of path and no heuristic rule will be involved.

      It is nevertheless common to specify two or more types of path. For example, a Java library may be compatible with either the class-path or the module-path, and the user may have provided no instruction about which type to use. In such case, the plugin may apply rules for choosing a path. See for example JavaPathType.CLASSES and JavaPathType.MODULES.

      Specified by:
      getPathTypes in interface Type
    • getProperties

      public Map<String,String> getProperties()
      Specified by:
      getProperties in interface org.eclipse.aether.artifact.ArtifactType