* What went wrong:
Execution failed for task ':job-dsl-plugin:install'.
> Could not publish configuration 'archives'
> For artifact {org.jenkins-ci.plugins:job-dsl:1.19-SNAPSHOT:jpi}: An attached artifact must have a different ID than its corresponding main artifact.
Side note, why would we want to publish the plugin as a jar? A jpi is not too different from a war. A project, in my mind, is either a jar or a war, not both. The job-dsl-core is a separate artifact which can act as a dependency, which is properly being published: http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/job-dsl-core/1.18/
If you have another plugin which would have the job-dsl-plugin as a dependency, then the jar needs to be there to put it on the compile classpath. At least this is how I think it works. Right now, no other plugin can depend on the job-dsl-plugin.
Publishing two artifacts just differing in their extension is currently not supported in gradle. One workaround would be to change the artifact name of your jar (maybe job-dsl-plugin-lib) or just add a classifier (like lib) to your jar