I recently ran into some issues regarding the artifacts in the archives configuration.
- 'archives' contains artifacts from other configurations
- Task - "UploadArchives" trying to publish artifacts from configuration other than "archives"
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 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).
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.