Error while doing maven build bnd-maven-plugin error | Community
Skip to main content
Nandheswara
Level 4
February 4, 2025
Solved

Error while doing maven build bnd-maven-plugin error

  • February 4, 2025
  • 2 replies
  • 1636 views

Hi All,

My project is running on java 8 and trying to build the code using the maven build command, while building the code i'm getting the error in core module as Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:5.0.0:bnd-process (bnd-process) on project projectname.core.common: bnd error: null: ConcurrentModificationException

 

 

 

[INFO] Reactor Summary:
[INFO]
[INFO] projectname 1.0-SNAPSHOT .......................... SUCCESS [ 0.260 s]
[INFO] projectname-common 1.0-COMMON-SNAPSHOT ............ SUCCESS [ 0.009 s]
[INFO] projectname - Common Core 1.0-COMMON-SNAPSHOT .... FAILURE [ 4.845 s]
[INFO] projectname - Common UI apps 1.0-COMMON-SNAPSHOT . SKIPPED
[INFO] projectname - Common UI content 1.0-COMMON-SNAPSHOT SKIPPED
[INFO] projectname-web 1.0-WEB-SNAPSHOT .................. SKIPPED
[INFO] projectname.ui.frontend - UI Frontend 1.0-WEB-SNAPSHOT SKIPPED
[INFO] projectname.ui.solid - UI Solid 1.0-WEB-SNAPSHOT .. SKIPPED
[INFO] projectname - Web UI apps 1.0-WEB-SNAPSHOT ....... SKIPPED
[INFO] projectname - Web UI content 1.0-WEB-SNAPSHOT .... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.022 s
[INFO] Finished at: 2025-02-03T18:05:37+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:5.0.0:bnd-process (bnd-process) on project projectname.core.common: bnd error: null: ConcurrentModificationException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :projectname.core.common

 

Can anyone give some suggestion about how to resolve this issue please

 

Thanks

Nandheswara

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shiv_Prakash_Patel

Hi @nandheswara ,

The ConcurrentModificationException error during the bnd-maven-plugin execution in your core module typically indicates issues with Maven dependencies, Java versions, or plugin compatibility. You can try below steps to resolve this issue:

1. If your project is on Java 8, consider upgrading to Java 11 because bnd-maven-plugin 5.0.0 might not be fully compatible with Java 8.

2. The bnd-maven-plugin:5.0.0 might be causing conflicts. Try downgrading it to an earlier stable version.

<plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-maven-plugin</artifactId> <version>4.3.1</version> <!-- Downgrade to a stable version --> </plugin>

3. Sometime maven dependency cache might be corrupted or outdated. Try cleaning and forcing a dependency update.

mvn clean install -U or rm -rf ~/.m2/repository mvn clean install

4. If you see conflicting versions of OSGi dependencies (bndlib, Felix, Sling), add explicit exclusions in pom.xml

<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.api</artifactId> <version>2.24.0</version> <exclusions> <exclusion> <groupId>biz.aQute.bnd</groupId> <artifactId>bndlib</artifactId> </exclusion> </exclusions> </dependency>

Regards,

2 replies

PRATHYUSHA_VP
Community Advisor
Community Advisor
February 4, 2025
Shiv_Prakash_Patel
Community Advisor
Shiv_Prakash_PatelCommunity AdvisorAccepted solution
Community Advisor
February 4, 2025

Hi @nandheswara ,

The ConcurrentModificationException error during the bnd-maven-plugin execution in your core module typically indicates issues with Maven dependencies, Java versions, or plugin compatibility. You can try below steps to resolve this issue:

1. If your project is on Java 8, consider upgrading to Java 11 because bnd-maven-plugin 5.0.0 might not be fully compatible with Java 8.

2. The bnd-maven-plugin:5.0.0 might be causing conflicts. Try downgrading it to an earlier stable version.

<plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-maven-plugin</artifactId> <version>4.3.1</version> <!-- Downgrade to a stable version --> </plugin>

3. Sometime maven dependency cache might be corrupted or outdated. Try cleaning and forcing a dependency update.

mvn clean install -U or rm -rf ~/.m2/repository mvn clean install

4. If you see conflicting versions of OSGi dependencies (bndlib, Felix, Sling), add explicit exclusions in pom.xml

<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.api</artifactId> <version>2.24.0</version> <exclusions> <exclusion> <groupId>biz.aQute.bnd</groupId> <artifactId>bndlib</artifactId> </exclusion> </exclusions> </dependency>

Regards,

Shiv Prakash