I am using the older ‘maven’ plugin because ‘maven-publish’ doesn’t work with the release plugin (townsfolk)
I create three archives. The main jar, a zip file containing an XML schema, and a jar with javadocs. The main jar and the schema zip are uploaded, but the javadocs are not. Unless I force it, the javadocs jar isn’t even created before the uploadArchives task runs. I find it odd that my “schemaZip” is included,but my javadocJar" is not.
Figured it out. uploadArchives doesn’t upload “artifacts” it only uploads what is added to the “archives” configuration. Apparently the Zip task type adds the output to the “archives” configuration automatically, but the Jar task type doesn’t???
The new ‘maven-publish’ plugin realizes what we now consider the right strategy (every artifact has to be published explicitly). The old ‘maven’ plugin will go away at some point, and I don’t expect it to receive further changes.
Yes. I want to use the newer plugin, but it had issues with the release plugin that removes -SNAPSHOT from the jar name and results in the publish task not finding the jars at the path with the previous name.
I couldn’t get it to work. Presumably that can be fixed (I would love to see it fixed in 1.8) so that actual file created by the jar task is used instead of what it would have been before the tasks actually ran.