Package org.apache.maven.api
Interface Type
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.Get the file extension of artifacts of this type.getId()
Returns the dependency type id.boolean
Specifies if the artifact contains java classes and should be added to the classpath.boolean
Specifies if the artifact already embeds its own dependencies.
-
Field Details
-
POM
- See Also:
-
JAR
- See Also:
-
JAVA_SOURCE
- See Also:
-
JAVADOC
- See Also:
-
MAVEN_PLUGIN
- See Also:
-
TEST_JAR
- See Also:
-
-
Method Details
-
getId
String getId()Returns the dependency type id. The id uniquely identifies this dependency type.- Returns:
- the id of this type
-
getExtension
String getExtension()Get the file extension of artifacts of this type.- Returns:
- the file extension
-
getClassifier
String getClassifier()Get the default classifier associated to the dependency type. The default classifier can be overridden when specifying theDependency.getClassifier()
.- Returns:
- the default classifier
-
isAddedToClasspath
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 classpath
-
isIncludesDependencies
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
-