From d43890aaa1dda1b9dfa8dfd992ef3657ae3fc49a Mon Sep 17 00:00:00 2001 From: Khushboo Sharma Date: Mon, 9 Dec 2024 10:07:24 +0530 Subject: [PATCH] build goal moved to package and major version update Signed-off-by:Khushboo Sharma Khushboo110597@ibm.com --- README.md | 15 +++++++++++++++ cics-bundle-deploy-reactor-archetype/pom.xml | 2 +- cics-bundle-maven-plugin/pom.xml | 2 +- .../main/resources/META-INF/plexus/components.xml | 4 +--- cics-bundle-maven-site/pom.xml | 2 +- cics-bundle-reactor-archetype/pom.xml | 2 +- pom.xml | 2 +- samples/pom.xml | 6 +++--- 8 files changed, 24 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 29e0bf72..cf76127d 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,21 @@ When you are using a bundle-war, bundle-ear, or bundle-osgi goal, the deploy goa **How to resolve it?** Use the cics-bundle configuration option to select the bundle, in the case where you're deploying a bundle-war-built bundle. + +### Error reading Bundle-SymbolicName from OSGi manifest file +**Why does it happen?** +You may run into this error when building an OSGi bundle. + +The build goal of the Maven Bundle Plugin is bound to the compile phase, but the manifest generation occurs in the process-classes phase, which runs after compile. As a result, if other processes or plugins expect the manifest data during the compile phase, it won't be available yet, leading to errors like "Error reading Bundle-SymbolicName from OSGi manifest file." + +**How to resolve it?** + +In Maven Bundle Plugin version 2.0.0 we moved the binding of the build goal from the compile phase to the package phase. This change ensures that the bundle is built as late as possible in the reactor build process, allowing all necessary class files and resources to be fully processed before the manifest is generated. + +**Action you must take when upgrading** + +If your project uses the cics-bundle packaging type to build any bundle part and you previously used the mvn compile command, you must now use mvn package instead.This change ensures that your bundle parts are packaged correctly with version 2.0.0. + ## Contributing We welcome contributions! Find out how in our [contribution guide](CONTRIBUTING.md). diff --git a/cics-bundle-deploy-reactor-archetype/pom.xml b/cics-bundle-deploy-reactor-archetype/pom.xml index d578c477..67f7cc24 100644 --- a/cics-bundle-deploy-reactor-archetype/pom.xml +++ b/cics-bundle-deploy-reactor-archetype/pom.xml @@ -4,7 +4,7 @@ com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT cics-bundle-deploy-reactor-archetype diff --git a/cics-bundle-maven-plugin/pom.xml b/cics-bundle-maven-plugin/pom.xml index 476cbf63..60304fa4 100644 --- a/cics-bundle-maven-plugin/pom.xml +++ b/cics-bundle-maven-plugin/pom.xml @@ -4,7 +4,7 @@ com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT cics-bundle-maven-plugin diff --git a/cics-bundle-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/cics-bundle-maven-plugin/src/main/resources/META-INF/plexus/components.xml index ec351302..85d07784 100644 --- a/cics-bundle-maven-plugin/src/main/resources/META-INF/plexus/components.xml +++ b/cics-bundle-maven-plugin/src/main/resources/META-INF/plexus/components.xml @@ -25,10 +25,8 @@ default - - com.ibm.cics:cics-bundle-maven-plugin:build - + com.ibm.cics:cics-bundle-maven-plugin:build, com.ibm.cics:cics-bundle-maven-plugin:package diff --git a/cics-bundle-maven-site/pom.xml b/cics-bundle-maven-site/pom.xml index dafe0f2c..7d4796d0 100644 --- a/cics-bundle-maven-site/pom.xml +++ b/cics-bundle-maven-site/pom.xml @@ -3,7 +3,7 @@ com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT cics-bundle-maven-site pom diff --git a/cics-bundle-reactor-archetype/pom.xml b/cics-bundle-reactor-archetype/pom.xml index 873df21d..94982171 100644 --- a/cics-bundle-reactor-archetype/pom.xml +++ b/cics-bundle-reactor-archetype/pom.xml @@ -4,7 +4,7 @@ com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT cics-bundle-reactor-archetype diff --git a/pom.xml b/pom.xml index 573c831b..c687e85b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT pom CICS Bundle Maven Parent diff --git a/samples/pom.xml b/samples/pom.xml index 3d1da250..3d077bc6 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -2,12 +2,12 @@ 4.0.0 samples - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT pom com.ibm.cics cics-bundle-maven - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT @@ -15,7 +15,7 @@ com.ibm.cics cics-bundle-maven-plugin - 1.0.8-SNAPSHOT + 2.0.0-SNAPSHOT