Expand my Community achievements bar.

SOLVED

Unable to create project from archetype BELOW IS A SOME ERROR PLEASE PROVIDE ME A SOLUTION

Avatar

Level 2

use this below command to create a project by using maven archetype

 

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=15 -DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/

 

Download it from below site:

https://repo.maven.apache.org/maven2/com/adobe/granite/archetypes/aem-project-archetype/15/

 

download --> aem-project-archetype-15.maven-archetype
rename it as --> aem-project-archetype-15.jar

 

and paste that aem-project-archetype-15.jar file in below path:

C:\Users\........\.m2\repository\com\adobe\aem\aem-project-archetype\35

paste it here but still its show error.

 

like below:

  1. Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  2. Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  3. [WARNING] Error reading archetype catalog https://repo.adobe.com/nexus/content/groups/public
    org.apache.maven.wagon.TransferFailedException: transfer failed for https://repo.adobe.com/nexus/content/groups/public
  4. Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  5. [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo.maven.apache.org/maven2).
    [WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.214 s
    [INFO] Finished at: 2022-05-27T18:13:49+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.adobe.granite.archetypes:aem-project-archetype:15) -> [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/MojoFailureException
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

HI @Rahul_mule 

 

I tried the same command and it worked for me. Can you add the adobe profile in your settings.xml and try (if not done already)

 

<profile>
<id>adobe-public</id>

<activation>
<activeByDefault>false</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>

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

HI @Rahul_mule 

 

I tried the same command and it worked for me. Can you add the adobe profile in your settings.xml and try (if not done already)

 

<profile>
<id>adobe-public</id>

<activation>
<activeByDefault>false</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>

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

Avatar

Community Advisor

Hi @Rahul_mule 

I can able to build project using above command 

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=15 -DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/

Screen Shot 2022-05-27 at 11.47.11 AM.png












Below are my specifications
AEM: 6.5.11
Java: 11.0.14.1
Maven: 
3.8.3

Also, I can see you have added jar under 35 (C:\Users\........\.m2\repository\com\adobe\aem\aem-project-archetype\35) ignore if its just a mistake.

Looking into above failure error, it seems you need to have proper proxy settings, check if you have proper certificates which allows to download jar while building project. (I guess you are using organization's machine where such problems we usually face - which requires additional configurations)

Hope that helps!

Regards,
Santosh