Class DefaultType
java.lang.Object
org.apache.maven.repository.internal.type.DefaultType
- All Implemented Interfaces:
ExtensibleEnum
,Type
,org.eclipse.aether.artifact.ArtifactType
Default implementation of
Type
and Resolver ArtifactType
.- Since:
- 4.0.0
-
Field Summary
Fields inherited from interface org.apache.maven.api.Type
BOM, CLASSPATH_JAR, CLASSPATH_PROCESSOR, FATJAR, JAR, JAVA_SOURCE, JAVADOC, MAVEN_PLUGIN, MODULAR_JAR, MODULAR_PROCESSOR, POM, PROCESSOR, TEST_JAR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the default classifier associated to the dependency type.Get the file extension of artifacts of this type.getId()
Returns the dependency type language.Types of path (class-path, module-path, …) where the dependency can be placed.id()
Returns the dependency type id.boolean
Specifies if the artifact already embeds its own dependencies.
-
Constructor Details
-
DefaultType
-
-
Method Details
-
id
Description copied from interface:Type
Returns the dependency type id. The id uniquely identifies this dependency type.- Specified by:
id
in interfaceExtensibleEnum
- Specified by:
id
in interfaceType
- Returns:
- the id of this type, never
null
.
-
getId
- Specified by:
getId
in interfaceorg.eclipse.aether.artifact.ArtifactType
-
getLanguage
Description copied from interface:Type
Returns the dependency type language.- Specified by:
getLanguage
in interfaceType
- Returns:
- the language of this type, never
null
.
-
getExtension
Description copied from interface:Type
Get the file extension of artifacts of this type.- Specified by:
getExtension
in interfaceorg.eclipse.aether.artifact.ArtifactType
- Specified by:
getExtension
in interfaceType
- Returns:
- the file extension, never
null
.
-
getClassifier
Description copied from interface:Type
Get the default classifier associated to the dependency type. The default classifier can be overridden when specifying theDependency.getClassifier()
.- Specified by:
getClassifier
in interfaceorg.eclipse.aether.artifact.ArtifactType
- Specified by:
getClassifier
in interfaceType
- 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 interfaceType
- Returns:
- if the artifact's dependencies are included in the artifact
-
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
andJavaPathType.MODULES
.- Specified by:
getPathTypes
in interfaceType
-
getProperties
- Specified by:
getProperties
in interfaceorg.eclipse.aether.artifact.ArtifactType
-