legal-notices does not exist error when building Policy Agents and OpenAM 11.0.0 from source
The purpose of this article is to provide assistance if you receive a legal-notices does not exist error when building Policy Agents and OpenAM 11.0.0 from source using Apache Maven™.
Archived
This article has been archived and is no longer maintained by ForgeRock.
Symptoms
Warning
ForgeRock support covers the use of the official binary builds made available and downloaded from our customer portal: BackStage. We will support builds made from source providing no changes have been made to the core code of the product, the product was built from a tag that matches an official release, for example, 12.0.0 and said product was built using the ForgeRock build scripts provided as part of the source. In the event that a customer experiences an issue with a ForgeRock product built from source where ForgeRock believe the issue is as a result of the build process, ForgeRock reserves the right to ask the customer to attempt to reproduce the issue on an official ForgeRock binary build. Customers who are running custom builds or who need further clarification should contact their ForgeRock sales representative.
The following error is shown when attempting to build from source:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project openam-server-only: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: basedir c:\openam11\target\legal-notices does not exist -> [Help 1]Recent Changes
N/A
Causes
The create folder script for the target/legal-notices folder is missing from the POM.
Solution
This issue can be resolved by commenting out or removing the following code in the war-plugin configuration section of the pom.xml file (located in the openam/openam-server-only directory in the war file) before building from source:
<webResource> <directory>${project.build.directory}/legal-notices</directory> <includes> <include>**/**</include> </includes> <targetPath>WEB-INF/legal-notices</targetPath> <filtering>true</filtering> </webResource>Alternatively, you can include the following mkdir script in the openam-server-prepare-war.xml file (located in the openam/openam-server-only directory in the war file) before building from source to ensure this folder is created during the build process:
<mkdir dir="${project.build.directory}/legal-notices"/>See Also
Building from source fails for Policy Agents 3.3.x and OpenAM 11.x with a NoGoalSpecifiedException
Aether ClassNotFound when building Policy Agents and OpenAM 13 from source
Related Training
N/A