You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gradle plugin should add the repackaged jar to the project's components and possibly expose it as a separate artifact #1666
changed the title [-]Gradle plugin should add the repackaged jar to the project's components[/-][+]Gradle plugin should add the repackaged jar to the project's components and possibly expose it as a separate artifact[/+]on Oct 6, 2014
Currently, I'm able to work around this in a rather haphazard manner:
// make sure bootRepackage is included in task graph
project.tasks.findAll { it.name.startsWith("publish") } .each { it.dependsOn assemble }
// so we can maintain both "normal" and "boot" jars
springBoot {
classifier = 'boot'
}
publishing {
publications {
maven(MavenPublication) {
// "normal" jar
from components.java
// "boot" jar
artifact ("$buildDir/libs/$project.name-$version-boot.jar") {
classifier = 'boot'
}
}
}
}
I'm sure there must be a more elegant way to get the output file from the bootRepackage task, but it doesn't seem to declare its outputs (ie, bootRepackage.outputs is empty).
Reacted by David Kowis, Michael Floering, Örjan Sjöholm, Klemens Muthmann, LG, Oleh Dokuka and Venelin
Activity
[-]Gradle plugin should add the repackaged jar to the project's components[/-][+]Gradle plugin should add the repackaged jar to the project's components and possibly expose it as a separate artifact[/+]jgriff commentedon Feb 26, 2015
Currently, I'm able to work around this in a rather haphazard manner:
I'm sure there must be a more elegant way to get the output file from the
bootRepackagetask, but it doesn't seem to declare its outputs (ie,bootRepackage.outputsis empty).gmcoringa commentedon Sep 27, 2015
You also can't sign the jar generated by
bootRepackage.mkobit commentedon Nov 23, 2015
+1. Would be useful to have access to the produced outputs so they can used in combination with other plugins, such as creating a Docker image.
5 remaining items
Publish artifacts and, when Maven plugin used, customize upload task
Create software components for Spring Boot jar and war artifacts
Publish artifacts and, when Maven plugin used, customize upload task