# Interface MavenArtifactSet

All Superinterfaces:
  `Collection<MavenArtifact>, DomainObjectCollection<MavenArtifact>, DomainObjectSet<MavenArtifact>, Iterable<MavenArtifact>, Set<MavenArtifact>`

@Incubating public interface MavenArtifactSet extends DomainObjectSet<MavenArtifact>
A Collection of `MavenArtifact`s to be included in a `MavenPublication`. Being a `DomainObjectSet`, a `MavenArtifactSet` provides convenient methods for querying, filtering, and applying actions to the set of `MavenArtifact`s.

    apply plugin: 'maven-publish'

    def publication = publishing.publications.create("name", MavenPublication)
    def artifacts = publication.artifacts

    artifacts.matching({
        it.classifier == "classy"
    }).all({
        it.extension = "ext"
    })

See Also:
  - `DomainObjectSet`

## Method Summary

Modifier and Type
Method
Description
`MavenArtifact`
`artifact(Object source)`
Creates and adds a `MavenArtifact` to the set.
`MavenArtifact`
`artifact(Object source, Action<? super MavenArtifact> config)`
Creates and adds a `MavenArtifact` to the set, which is configured by the associated action.

### Methods inherited from interface Collection

`parallelStream, removeIf, stream, toArray`

### Methods inherited from interface DomainObjectCollection

`all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType`

### Methods inherited from interface DomainObjectSet

`findAll, matching, matching, withType`

### Methods inherited from interface Iterable

`forEach`

### Methods inherited from interface Set

`add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray`

## Method Details

### artifact

MavenArtifact artifact(Object source)
Creates and adds a `MavenArtifact` to the set. The semantics of this method are the same as `MavenPublication.artifact(Object)`.

Parameters:
  `source` - The source of the artifact content.

### artifact

MavenArtifact artifact(Object source, Action<? super MavenArtifact> config)
Creates and adds a `MavenArtifact` to the set, which is configured by the associated action. The semantics of this method are the same as `MavenPublication.artifact(Object, Action)`.

Parameters:
  `source` - The source of the artifact.
  `config` - An action or closure to configure the values of the constructed `MavenArtifact`.