Class SubArtifact

  • All Implemented Interfaces:
    org.eclipse.aether.artifact.Artifact

    public final class SubArtifact
    extends org.eclipse.aether.artifact.AbstractArtifact
    An artifact whose identity is derived from another artifact. Note: Instances of this class are immutable and the exposed mutators return new objects rather than changing the current instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension)
      Creates a new sub artifact.
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension, java.io.File file)
      Creates a new sub artifact.
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension, java.nio.file.Path path)
      Creates a new sub artifact.
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension, java.util.Map<java.lang.String,​java.lang.String> properties)
      Creates a new sub artifact.
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension, java.util.Map<java.lang.String,​java.lang.String> properties, java.io.File file)
      Creates a new sub artifact.
      SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact, java.lang.String classifier, java.lang.String extension, java.util.Map<java.lang.String,​java.lang.String> properties, java.nio.file.Path path)
      Creates a new sub artifact.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String getArtifactId()  
      java.lang.String getBaseVersion()  
      java.lang.String getClassifier()  
      java.lang.String getExtension()  
      java.io.File getFile()
      Deprecated.
      java.lang.String getGroupId()  
      java.nio.file.Path getPath()  
      java.util.Map<java.lang.String,​java.lang.String> getProperties()  
      java.lang.String getVersion()  
      boolean isSnapshot()  
      org.eclipse.aether.artifact.Artifact setFile​(java.io.File file)
      Deprecated.
      org.eclipse.aether.artifact.Artifact setPath​(java.nio.file.Path path)  
      org.eclipse.aether.artifact.Artifact setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)  
      • Methods inherited from class org.eclipse.aether.artifact.AbstractArtifact

        copyProperties, equals, getProperty, hashCode, setVersion, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension,
                           java.io.File file)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
        file - the file for this artifact, may be null if unresolved
      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension,
                           java.nio.file.Path path)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
        path - the file for this artifact, may be null if unresolved
        Since:
        2.0.0
      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension,
                           java.util.Map<java.lang.String,​java.lang.String> properties)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
        properties - the properties of the artifact, may be null
      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension,
                           java.util.Map<java.lang.String,​java.lang.String> properties,
                           java.io.File file)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
        properties - the properties of the artifact, may be null
        file - the file for this artifact, may be null if unresolved
      • SubArtifact

        public SubArtifact​(org.eclipse.aether.artifact.Artifact mainArtifact,
                           java.lang.String classifier,
                           java.lang.String extension,
                           java.util.Map<java.lang.String,​java.lang.String> properties,
                           java.nio.file.Path path)
        Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk character "*" to refer to the corresponding property of the main artifact. For instance, the classifier "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be used to refer to the GPG signature of an artifact.
        Parameters:
        mainArtifact - the artifact from which to derive the identity, must not be null
        classifier - the classifier for this artifact, may be null if none
        extension - the extension for this artifact, may be null if none
        properties - the properties of the artifact, may be null
        path - the file for this artifact, may be null if unresolved
        Since:
        2.0.0
    • Method Detail

      • getGroupId

        public java.lang.String getGroupId()
      • getVersion

        public java.lang.String getVersion()
      • getBaseVersion

        public java.lang.String getBaseVersion()
        Specified by:
        getBaseVersion in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        getBaseVersion in class org.eclipse.aether.artifact.AbstractArtifact
      • isSnapshot

        public boolean isSnapshot()
        Specified by:
        isSnapshot in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        isSnapshot in class org.eclipse.aether.artifact.AbstractArtifact
      • getFile

        @Deprecated
        public java.io.File getFile()
        Deprecated.
      • getPath

        public java.nio.file.Path getPath()
        Specified by:
        getPath in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        getPath in class org.eclipse.aether.artifact.AbstractArtifact
      • setFile

        @Deprecated
        public org.eclipse.aether.artifact.Artifact setFile​(java.io.File file)
        Deprecated.
        Specified by:
        setFile in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        setFile in class org.eclipse.aether.artifact.AbstractArtifact
      • setPath

        public org.eclipse.aether.artifact.Artifact setPath​(java.nio.file.Path path)
        Specified by:
        setPath in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        setPath in class org.eclipse.aether.artifact.AbstractArtifact
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
      • setProperties

        public org.eclipse.aether.artifact.Artifact setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Specified by:
        setProperties in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        setProperties in class org.eclipse.aether.artifact.AbstractArtifact