# Archives configuration & default artifacts behavior/documentation

**URL:** <https://discuss.gradle.org/t/archives-configuration-default-artifacts-behavior-documentation/18732>\
**Category:** Help/Discuss\
**Created:** [July 29, 2016, 9:21am UTC](https://discuss.gradle.org/t/archives-configuration-default-artifacts-behavior-documentation/18732 "2016-07-29T09:21:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![avonengel](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@avonengel](https://discuss.gradle.org/u/avonengel)\
**Post date:** [July 29, 2016, 9:21am UTC](https://discuss.gradle.org/t/archives-configuration-default-artifacts-behavior-documentation/18732/1 "2016-07-29T09:21:52Z")

</div>

I recently ran into some issues regarding the artifacts in the archives configuration.  
Related topics:

- ['archives' contains artifacts from other configurations](https://discuss.gradle.org/t/archives-contains-artifacts-from-other-configurations/18401)
- [Task - "UploadArchives" trying to publish artifacts from configuration other than "archives"](https://discuss.gradle.org/t/task-uploadarchives-trying-to-publish-artifacts-from-configuration-other-than-archives/18093)

What I found is this:  
`BasePlugin` configures a `DefaultArtifactPublicationSet` to add default artifacts to the archives configuration - such as jar, ear, and war archives ([source](https://github.com/gradle/gradle/blob/6a42a3675bb04de97f9531b1ef53d4cd194e4054/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.java#L154) lines 154 - 166).  
`DefaultArtifactPublicationSet` subsequently adds all artifacts that are not of type jar, ear, or war to the artifacts of the archives configuration ([source](https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/groovy/org/gradle/api/internal/plugins/DefaultArtifactPublicationSet.java#L48)).

**This effectively adds all artifacts of all configurations to the archives configuration, unless they are Jar, Ear, or War.**  
Is this intended? If it is, I would expect the documentation to state that explicitly - which I didn’t find anywhere.
