Package org.apache.maven.api
Interface Type
- All Known Implementing Classes:
DefaultType
A dependency's
Type
is uniquely identified by a String
,
and semantically represents a known kind of dependency.
It provides information about the file type (or extension) of the associated artifact, its default classifier, and how the artifact will be used in the build when creating classpaths.
For example, the type java-source
has a jar
extension and a
sources
classifier. The artifact and its dependencies should be added
to the classpath.
- Since:
- 4.0.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the default classifier associated to the dependency type.Gets the default properties associated with this dependency type.Get the file extension of artifacts of this type.getId()
Returns the dependency type id.Returns the dependency type language.default boolean
Specifies if the artifact contains java classes and should be added to the classpath.default boolean
Specifies if the artifact already embeds its own dependencies.
-
Field Details
-
LANGUAGE_NONE
- See Also:
-
LANGUAGE_JAVA
- See Also:
-
-
Method Details
-
getId
Returns the dependency type id. The id uniquely identifies this dependency type.- Returns:
- the id of this type, never
null
.
-
getLanguage
String getLanguage()Returns the dependency type language.- Returns:
- the language of this type, never
null
.
-
getExtension
Get the file extension of artifacts of this type.- Returns:
- the file extension, never
null
.
-
getClassifier
Get the default classifier associated to the dependency type. The default classifier can be overridden when specifying theDependency.getClassifier()
.- Returns:
- the default classifier, or
null
.
-
isAddedToClassPath
default boolean isAddedToClassPath()Specifies if the artifact contains java classes and should be added to the classpath.- Returns:
- if the artifact should be added to the class path
-
isIncludesDependencies
default boolean isIncludesDependencies()Specifies if the artifact already embeds its own dependencies. This is the case for JEE packages or similar artifacts such as WARs, EARs, etc.- Returns:
- if the artifact's dependencies are included in the artifact
-
getDependencyProperties
Gets the default properties associated with this dependency type.- Returns:
- the default properties, never
null
.
-