0

I am using spring boot 2.1.2.RELEASE and gradle 4.10 where I would like to create 2 jars, one is with simulator classes and the other without simulator classes. In boot 1.X I used to use the BootRepackage to achieve the same which is deprecated in boot 2.0. Any suggestions on how to achieve this?

bootJar {
  if(project.findProperty("simulator") == "true") {
    baseName = "${rootProject.name}-simulator"
  } else {
    baseName = "${rootProject.name}"
    exclude(['com/sample/app/simulator/**'])
 }
 version = appVersion
 manifest {
    attributes(
        "Implementation-Title": baseName,
        "Implementation-Version": version
    )
}

}

Sujit
  • 468
  • 1
  • 8
  • 22
  • Do you want both jars to be a Spring Boot fat jar, or one to be a fat jar and the other to be a normal jar? – Andy Wilkinson Mar 21 '19 at 07:18
  • I would like both to be fatJar. Both will be uploaded to Artifactory in different bucket. In the test environment I would like to use the simulator version and in stage (upper env after test) would like to use non-simulator version. Both will be deployed to PCF different spaces based on their naming convention either simulator vs without simulator. – Sujit Mar 21 '19 at 13:53

0 Answers0