I'm looking to package my project into a JAR without spring boot or how to access the classes in that JAR when imported?
Asked
Active
Viewed 147 times
1 Answers
0
Figured it out, at least in Gradle you need to add the tasks below. "springBoot" may be optional but didn't test without but it depends on your need. In other versions of the plug-in (spring-boot-dependencies) you may see "springBoot" task as "bootRepackage" and the jar task would be "enabled=false" in "bootRepackage". Gradle help and this. For Maven you could reference this.
springBoot {
mainClassName = 'myPackage.App'
}
jar {
enabled = true
}

Reeves
- 33
- 2
- 5