I do not think it has anything to do with the Nexus and underlying Maven plugin, but I cannot rule it out, so I’ve left it as part of the potential problem space.
apply plugin: 'java' apply plugin: 'nexus' apply plugin: 'distribution'
apply plugin: 'distribution' apply plugin: 'java' apply plugin: 'nexus'
In the first scenario, uploadArchives will publish a .jar and .tar and .zip if they get created.
In the second scenario, uploadArchives will NOT publish the .jar, but will still publish .tar and .zip if they get created.
Clearly the workaround is to simply apply the distribution plugin after the java plugin, but not sure if this is the intended behavior.