Solutions
ForgeRock Identity Platform
Does not apply to Identity Cloud

Building AM 7.x projects from source fail with a Failed to execute goal error

Last updated May 13, 2021

The purpose of this article is to provide assistance if you encounter a "Failed to execute goal" error when trying to build an AM 7.x project extension (such as a custom authentication node) from source. The error will reference the following dependency: org.apache.servicemix.bundles:org.apache.servicemix.bundles.java-xmlbuilder:bundle:1.1_1.


1 reader recommends this article

Symptoms 

Building an AM 7.x extension project (such as a custom node) from source fails.

You will see an error similar to one of the following when this happens:

[ERROR] Failed to execute goal on project [project_name]: Could not resolve dependencies for project [project_name]: Could not find artifact org.apache.servicemix.bundles:org.apache.servicemix.bundles.java-xmlbuilder:bundle:1.1_1 in forgerock-private-releases (https://maven.forgerock.org:443/repo/private-releases) -> [Help 1]

[ERROR] Failed to execute goal on project [project_name]: Could not resolve dependencies for project [project_name]: Could not transfer artifact org.apache.servicemix.bundles:org.apache.servicemix.bundles.java-xmlbuilder:bundle:1.1_1 from/to forgerock-private-releases (https://maven.forgerock.org:443/repo/private-releases): Authorization failed for https://maven.forgerock.org:443/repo/private-releases/org/apache/servicemix/bundles/org.apache.servicemix.bundles.java-xmlbuilder/1.1_1/org.apache.servicemix.bundles.java-xmlbuilder-1.1_1.bundle 403 Forbidden -> [Help 1]

Recent Changes

Upgraded to, or installed AM 7.x.

Causes

Changes were made to library dependencies in AM 7. 

As a result, this error occurs because the org.apache.servicemix.bundles:org.apache.servicemix.bundles.java-xmlbuilder dependency is missing from your Maven repository and cannot be retrieved using the default project configuration. This bundle package must be made available during the Maven build phase by adding a new Maven plugin (as explained in the solution).

Solution

This issue can be resolved by adding the following section to the project pom.xml before rebuilding your project extension:

<build> <plugins> <plugin>      <groupId>org.apache.felix</groupId>       <artifactId>maven-bundle-plugin</artifactId>       <version>4.2.1</version>       <extensions>true</extensions> </plugin> </plugins> </build>

See Also

Authentication Node Development Guide

Related Training

N/A

Related Issue Tracker IDs

N/A



Copyright and TrademarksCopyright © 2021 ForgeRock, all rights reserved.
Loading...