From 10e9f68759d0a5f465c2af2a97e0496d6010ff94 Mon Sep 17 00:00:00 2001 From: Sophie Green Date: Tue, 21 Jul 2020 11:02:48 +0100 Subject: [PATCH] Rename resources folder to bundleParts Signed-off-by: Sophie Green --- README.md | 2 +- .../main/{resources => bundleParts}/EventBinding.evbind | 0 .../src/main/{resources => bundleParts}/PROG1.program | 0 .../src/main/{resources => bundleParts}/mymap.urimap | 0 .../src/main/{resources => bundleParts}/noextension | 0 .../cbmp/AbstractAutoConfigureBundlePublisherMojo.java | 8 ++++---- 6 files changed, 5 insertions(+), 5 deletions(-) rename cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/{resources => bundleParts}/EventBinding.evbind (100%) rename cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/{resources => bundleParts}/PROG1.program (100%) rename cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/{resources => bundleParts}/mymap.urimap (100%) rename cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/{resources => bundleParts}/noextension (100%) diff --git a/README.md b/README.md index d329e8d7..86b0c87d 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ To create a CICS bundle in this way: The generated CICS bundle takes its bundle ID from the Maven module's `artifactId` and its version from the Maven module's `version`. -1. To include CICS bundleparts like FILE or URIMAP, put the bundlepart files in your Maven project's resources directory, for instance `src/main/resources`. Files in your Maven project's resources directory will be included within the output CICS bundle, and supported types will have a `` element added to the CICS bundle's `cics.xml`. +1. To include CICS bundleparts like FILE or URIMAP, put the bundlepart files in your bundle Maven module's bundleParts directory, for instance `src/main/bundleParts`. Files in your Maven module's bundleParts directory will be included within the output CICS bundle, and supported types will have a `` element added to the CICS bundle's `cics.xml`. ## Create a CICS bundle (from an existing Java module) using `cics-bundle-maven-plugin` diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/EventBinding.evbind b/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/EventBinding.evbind similarity index 100% rename from cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/EventBinding.evbind rename to cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/EventBinding.evbind diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/PROG1.program b/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/PROG1.program similarity index 100% rename from cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/PROG1.program rename to cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/PROG1.program diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/mymap.urimap b/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/mymap.urimap similarity index 100% rename from cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/mymap.urimap rename to cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/mymap.urimap diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/noextension b/cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/noextension similarity index 100% rename from cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/resources/noextension rename to cics-bundle-maven-plugin/src/it/test-reactor-resourcedef/test-bundle/src/main/bundleParts/noextension diff --git a/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java b/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java index abc44589..06c838c4 100644 --- a/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java +++ b/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java @@ -65,7 +65,7 @@ protected void initBundlePublisher(BundlePublisher bundlePublisher) throws MojoE private void addStaticBundleResources(BundlePublisher bundlePublisher) throws MojoExecutionException { //Add bundle parts for any resources Path basePath = baseDir.toPath(); - Path bundlePartSource = basePath.resolve("src/main/resources"); + Path bundlePartSource = basePath.resolve("src/main/bundleParts"); getLog().info("Gathering bundle parts from " + basePath.relativize(bundlePartSource)); if (Files.exists(bundlePartSource)) { @@ -83,14 +83,14 @@ private void addStaticBundleResources(BundlePublisher bundlePublisher) throws Mo () -> Files.newInputStream(toAdd) ); } catch (PublishException e) { - throw new MojoExecutionException("Failure adding static resource " + toAdd + ": " + e.getMessage(), e); + throw new MojoExecutionException("Failure adding static bundle parts " + toAdd + ": " + e.getMessage(), e); } } } catch (IOException e) { - throw new MojoExecutionException("Failure adding static resources", e); + throw new MojoExecutionException("Failure adding static bundle parts", e); } } else { - throw new MojoExecutionException("Static bundle resources directory " + bundlePartSource + "wasn't a directory"); + throw new MojoExecutionException("Static bundle parts directory " + bundlePartSource + "wasn't a directory"); } } else { //Ignore if it doesn't exist