Skip to content

Commit

Permalink
Merge pull request #253 from IBM/move-build-goal-to-package-phase
Browse files Browse the repository at this point in the history
build goal moved to package and major version update
  • Loading branch information
Khushboo-Sharma-110597 authored Dec 21, 2024
2 parents 02bc802 + d43890a commit 06ca10f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 11 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-SNAPSHOT</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-SNAPSHOT</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-SNAPSHOT</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-SNAPSHOT</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-SNAPSHOT</version>
<packaging>pom</packaging>

<name>CICS Bundle Maven Parent</name>
Expand Down
6 changes: 3 additions & 3 deletions samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>samples</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>com.ibm.cics</groupId>
<artifactId>cics-bundle-maven</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</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-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit 06ca10f

Please sign in to comment.