/** * 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. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. * @param properties The properties of the artifact, may be {@code null}. * @param file The file for this artifact, may be {@code null} if unresolved. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension, Map<String, String> properties, File file ) { this.mainArtifact = requireNonNull( mainArtifact, "main artifact cannot be null" ); this.classifier = classifier; this.extension = extension; this.file = file; this.properties = copyProperties( 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. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. * @param properties The properties of the artifact, may be {@code null}. * @param file The file for this artifact, may be {@code null} if unresolved. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension, Map<String, String> properties, File file ) { if ( mainArtifact == null ) { throw new IllegalArgumentException( "no artifact specified" ); } this.mainArtifact = mainArtifact; this.classifier = classifier; this.extension = extension; this.file = file; this.properties = copyProperties( properties ); }