IBM / cics-bundle-gradle

The plugin to build and deploy CICS bundles in a Gradle build.
Eclipse Public License 2.0
7 stars 20 forks source link

Java resources being included in CICS bundle main directory #70

Closed timhandler closed 4 years ago

timhandler commented 4 years ago

Hi,

I noticed when building a Spring Boot application artifacts within the Java project (src/main/resources directory) are being included within the newly built CICS bundle directory.

I have attached the output from the build using the --info option. In there you can see the file application.properties being added to the CICS bundle in error.

Task :buildCICSBundle Excluding [] Caching disabled for task ':buildCICSBundle' because: Build cache is disabled Task ':buildCICSBundle' is not up-to-date because: Output property 'outputDirectory' file C:\Tim\Projects\web-app\build\web-app-0.0.1-SNAPSHOT has been removed. Output property 'outputDirectory' file C:\Tim\Projects\web-app\build\web-app-0.0.1-SNAPSHOT\META-INF has been removed. Output property 'outputDirectory' file C:\Tim\Projects\web-app\build\web-app-0.0.1-SNAPSHOT\META-INF\cics.xml has been removed. Task buildCICSBundle (Gradle 6.0.1) Adding bundle parts to the bundle Adding Java-based bundle parts from 'cicsBundle' dependency configuration Adding Java-based bundle part: 'C:\Tim\Projects\web-app\build\libs\web-app-0.0.1-SNAPSHOT.war' Adding non-Java-based bundle parts from 'src/main/resources' Adding non-Java-based bundle part: 'application.properties' :buildCICSBundle (Thread[Execution worker for ':',5,main]) completed. Took 0.293 secs. :packageCICSBundle (Thread[Execution worker for ':',5,main]) started.

Thanks, Tim Handler

stewartfrancis commented 4 years ago

Hi Tim. The intent of including the contents of the src/main/resources folder is to allow you to add other bundle parts to your bundle by manually putting them in there. Obviously this doesn't play nice with other plugins which are using src/main/resources for their own purposes. I think it'd make sense to change this to src/main/bundleparts and have it user-configurable, before we do a v 1.0.0 release, which would avoid issues like this. @tom-foyle @ind1go what do you guys think?

markcocker commented 4 years ago

src/main/bundleparts I wondered if the name should include CICS as bundle is a very overloaded term. eg. cicsresources or cicsbundleparts. It would be nice to copy/include non CICS bundle parts in the future which may influence the choice of name.

tom-foyle commented 4 years ago

Hi Tim. The intent of including the contents of the src/main/resources folder is to allow you to add other bundle parts to your bundle by manually putting them in there. Obviously this doesn't play nice with other plugins which are using src/main/resources for their own purposes. I think it'd make sense to change this to src/main/bundleparts and have it user-configurable, before we do a v 1.0.0 release, which would avoid issues like this. @tom-foyle @ind1go what do you guys think?

Yes I agree. And we should ideally update the Maven plugin to match.

I don't mind too much on the name. cicsbundleparts would match the terminology used in build.gradle. But it's a bit long, and not ideal if there is a chance of including non-CICS bundle parts in the future.

ind1go commented 4 years ago

This fix is now available in release 1.0.1.