gradle-karaf-plugin icon indicating copy to clipboard operation
gradle-karaf-plugin copied to clipboard

During a composite build, the parent jar is copied in place of all composite build jars in the generated kar

Open crosscontrol opened this issue 6 years ago • 6 comments

When generating a kar from a gradle composite build, the composite build project jar is copied in place of all of the included includeBuild('projectPath') jar files.

To reproduce the problem, please see the attached zip file.

Extract the zip file and run gradlew jar generateFeatures generateKar from the karafPluginCompositeBug directory.

Now extract ProjectA.jar from the exploded kar directory: "karafPluginCompositeBug/build/karaf/kar/exploded/repository/com/github/projecta/ProjectA/1.0/ProjectA-1.0.jar"

You will notice that the plugin copied the parent jar file (karafPluginCompositeBug-1.0.jar) but with the name ProjectA-1.0.jar which is the bug. It should contain the ProjectA.class file but instead contains Bug.class.

If you examine the ProjectA-1.0.jar file in "ProjectA/build/libs/ProjectA-1.0.jar", you will notice it contains the proper ProjectA.class file.

Thank you for all your great work on this project!

karafPluginCompositeBug.zip

crosscontrol avatar Oct 21 '17 02:10 crosscontrol