Hi Murali,
Firstly, the use of the system scope and systemPath elements in your Maven POM file is not recommended and generally not supported in Cloud Manager. This approach is intended for dependencies that are part of the JDK or the VM and hence is not suitable for third-party libraries which should be managed through a repository.
According to Adobe's documentation, all third-party packages must be available via Adobe’s public Maven artifact repository or an accessible public, third-party Maven artifact repository. If the packages are not in Adobe’s repository, and they are in a public repository, that repository must be registered in your project’s pom.xml. If storing the package in a remote repository is not possible, Adobe recommends placing it in a local, file-system-based Maven repository, which is committed to the source control management (SCM) as part of the project.
Here's a broad breakdown of the steps you should follow based on the information:
- Remove the systemPath dependency from your POM file as it is not suitable for AEM as a Cloud Service.
- Instead, create a local Maven repository within your project structure and commit it to your SCM.
- Declare this repository in your project’s top-level pom.xml.
- Reference the dependency in your POM file without using the systemPath.
Here is an example snippet provided by Adobe for declaring a local repository in your pom.xml:
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/local-repo</url>
</repository>And then, you should reference your dependency like this:
<dependency>
<groupId>com.aem</groupId>
<artifactId>aem-bundle</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
For this to work, you must place your JAR in the correct location within the local repository structure that Maven expects, which mirrors the group and version structure of the repository's URL.
Adobe provides detailed documentation on how to include and manage third-party dependencies. Following these guidelines should help resolve the build issues you are experiencing with Cloud Manager.