Suren Konathala
Suren Konathala

Reputation: 3597

AEM project built with Archetype 22 Fails to build - Failed to collect dependencies

Built a new codebase using AEM Archetype 22. But code build (using command mvn clean install -PautoInstallPackage ) fails with the below message. How can this be resolved?

Trying to deploy to AEM 6.3.3 on Windows 10 Enterprise

[ERROR] Failed to execute goal on project sow3pocs.core: Could not resolve dependencies for project com.creditonebank.aem.pocs:sow3pocs.core:jar:1.0-SNAPSHOT: Failed to collect dependencies at io.wcm:io.wcm.testing.aem-mock.junit5:jar:2.5.2 -> io.wcm:io.wcm.testing.aem-mock.core:jar:2.5.2 -> com.day.commons:day-commons-gfx:jar:2.1.28: Failed to read artifact descriptor for com.day.commons:day-commons-gfx:jar:2.1.28: Could not transfer artifact com.day.commons:day-commons-gfx:pom:2.1.28 from/to adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

The settings.xml under .m2 folder is:

<settings xmlns="https://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
 <!-- ====================================================== -->
 <!-- A D O B E   P U B L I C   P R O F I L E                -->
 <!-- ====================================================== -->
     <profile>
         <id>adobe-public</id>
         <activation>
             <activeByDefault>true</activeByDefault>
         </activation>
         <properties>
             <releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
             <releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
             <releaseRepository-URL>https://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>
         </properties>
         <repositories>
             <repository>
                 <id>adobe-public-releases</id>
                 <name>Adobe Public Repository</name>
                 <url>https://repo.adobe.com/nexus/content/groups/public</url>
                 <releases>
                     <enabled>true</enabled>
                     <updatePolicy>never</updatePolicy>
                 </releases>
                 <snapshots>
                     <enabled>false</enabled>
                 </snapshots>
             </repository>
         </repositories>
         <pluginRepositories>
             <pluginRepository>
                 <id>adobe-public-releases</id>
                 <name>Adobe Public Repository</name>
                 <url>https://repo.adobe.com/nexus/content/groups/public</url>
                 <releases>
                     <enabled>true</enabled>
                     <updatePolicy>never</updatePolicy>
                 </releases>
                 <snapshots>
                     <enabled>false</enabled>
                 </snapshots>
             </pluginRepository>
         </pluginRepositories>
     </profile>
</profiles>
 <activeProfiles>
     <activeProfile>adobe-public</activeProfile>
 </activeProfiles>
</settings>

Upvotes: 1

Views: 809

Answers (1)

TomasH
TomasH

Reputation: 148

This appears to be caused by maven's inability to connect to Adobe repo because it does not trust the certificate. Either this is temporary problem on Adobe side (not very likely but possible) or something in your setup is causing this.

This could happen in corporate environment where Internet access is often routed via Proxy server(s).

I would suggest you try to figure out where exactly is the request is failing. Then you should insert the certificate of the CA (certification authority - who actually issued the certificate your computer does not trust) into your jave certificate file (or use your own custom CA store - see google for further help on this topic).

Upvotes: 0

Related Questions