Skip to content

Commit

Permalink
build goal moved to package and major version update Signed-off-by:Kh…
Browse files Browse the repository at this point in the history
…ushboo Sharma [email protected]
  • Loading branch information
Khushboo-Sharma-110597 committed Dec 19, 2024
1 parent 02bc802 commit 2f66067
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 10 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <classifier>cics-bundle</classifier> 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).
Expand Down
2 changes: 1 addition & 1 deletion cics-bundle-deploy-reactor-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>cics-bundle-deploy-reactor-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion cics-bundle-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>cics-bundle-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
<lifecycle>
<id>default</id>
<phases>
<compile>
com.ibm.cics:cics-bundle-maven-plugin:build
</compile>
<package>
com.ibm.cics:cics-bundle-maven-plugin:build,
com.ibm.cics:cics-bundle-maven-plugin:package
</package>
<install>
Expand Down
2 changes: 1 addition & 1 deletion cics-bundle-maven-site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</parent>
<artifactId>cics-bundle-maven-site</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion cics-bundle-reactor-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>cics-bundle-reactor-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
<packaging>pom</packaging>

<name>CICS Bundle Maven Parent</name>
Expand Down
4 changes: 2 additions & 2 deletions samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<dependencies>
<!-- This will be installed from this build into the invoker's repo by invoker:install -->
<dependency>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven-plugin</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit 2f66067

Please sign in to comment.