Package org.eclipse.aether.artifact
Class DefaultArtifactType
java.lang.Object
org.eclipse.aether.artifact.DefaultArtifactType
- All Implemented Interfaces:
ArtifactType
A simple artifact type.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new artifact type with the specified identifier.DefaultArtifactType(String id, String extension, String classifier, String language) Creates a new artifact type with the specified properties.DefaultArtifactType(String id, String extension, String classifier, String language, boolean constitutesBuildPath, boolean includesDependencies) Creates a new artifact type with the specified properties.Creates a new artifact type with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionGets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact).Gets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact).getId()Gets the identifier of this type, e.g.Gets the properties to use for artifacts of this type (unless explicitly overridden by the artifact).
-
Constructor Details
-
DefaultArtifactType
Creates a new artifact type with the specified identifier. This constructor assumes the usual file extension equals the given type id and that the usual classifier is empty. Additionally, the propertiesArtifactProperties.LANGUAGE,ArtifactProperties.CONSTITUTES_BUILD_PATHandArtifactProperties.INCLUDES_DEPENDENCIESwill be set to"none",trueandfalse, respectively.- Parameters:
id- The identifier of the type which will also be used as the value for theArtifactProperties.TYPEproperty, must not benullor empty.
-
DefaultArtifactType
Creates a new artifact type with the specified properties. Additionally, the propertiesArtifactProperties.CONSTITUTES_BUILD_PATHandArtifactProperties.INCLUDES_DEPENDENCIESwill be set totrueandfalse, respectively.- Parameters:
id- The identifier of the type which will also be used as the value for theArtifactProperties.TYPEproperty, must not benullor empty.extension- The usual file extension for artifacts of this type, may benull.classifier- The usual classifier for artifacts of this type, may benull.language- The value for theArtifactProperties.LANGUAGEproperty, may benull.
-
DefaultArtifactType
public DefaultArtifactType(String id, String extension, String classifier, String language, boolean constitutesBuildPath, boolean includesDependencies) Creates a new artifact type with the specified properties.- Parameters:
id- The identifier of the type which will also be used as the value for theArtifactProperties.TYPEproperty, must not benullor empty.extension- The usual file extension for artifacts of this type, may benull.classifier- The usual classifier for artifacts of this type, may benull.language- The value for theArtifactProperties.LANGUAGEproperty, may benull.constitutesBuildPath- The value for theArtifactProperties.CONSTITUTES_BUILD_PATHproperty.includesDependencies- The value for theArtifactProperties.INCLUDES_DEPENDENCIESproperty.
-
DefaultArtifactType
public DefaultArtifactType(String id, String extension, String classifier, Map<String, String> properties) Creates a new artifact type with the specified properties.- Parameters:
id- The identifier of the type, must not benullor empty.extension- The usual file extension for artifacts of this type, may benull.classifier- The usual classifier for artifacts of this type, may benull.properties- The properties for artifacts of this type, may benull.
-
-
Method Details
-
getId
Description copied from interface:ArtifactTypeGets the identifier of this type, e.g. "maven-plugin" or "test-jar".- Specified by:
getIdin interfaceArtifactType- Returns:
- The identifier of this type, never
null. - See Also:
-
getExtension
Description copied from interface:ArtifactTypeGets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact).- Specified by:
getExtensionin interfaceArtifactType- Returns:
- The usual file extension, never
null.
-
getClassifier
Description copied from interface:ArtifactTypeGets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact).- Specified by:
getClassifierin interfaceArtifactType- Returns:
- The usual classifier or an empty string if none, never
null.
-
getProperties
Description copied from interface:ArtifactTypeGets the properties to use for artifacts of this type (unless explicitly overridden by the artifact).- Specified by:
getPropertiesin interfaceArtifactType- Returns:
- The (read-only) properties, never
null. - See Also:
-