Expand my Community achievements bar.

SOLVED

Migrate Asset Share Commons from AEM 6.5.18 to AEM cloud

Avatar

Level 3

Hi All,

 

I know Asset share commons is outside the scope of the AEM is open source.

However, for upgrading the Asset share commons to cloud we are facing issues.

 

in ui.apps we have the below dependency - 

<dependency>
<groupId>com.adobe.aem.commons</groupId>
<artifactId>assetshare</artifactId>
<version>2.3.4</version>
<type>zip</type>
</dependency>
<dependency>
<artifactId>assetshare.core</artifactId>
<version>2.0.6</version>
<groupId>com.adobe.aem.commons</groupId>
<scope>provided</scope>
</dependency>

Do we need to change anything other than adding <classifier>cloud</classifier> to the dependency?

 

If I add that I am getting the below error - 
Downloading from central: https://project.jfrog.io/project/cem-assets-maven-virtual/com/adobe/aem/commons/assetshare/2.3.4/ass...
Downloading from maven-public-releases: https://repo1.maven.org/maven2/com/adobe/aem/commons/assetshare/2.3.4/assetshare-2.3.4.zip
Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/com/adobe/aem/commons/assetshare/2.3.4/assetshare...
Downloading from adobe-aem-releases: https://downloads.experiencecloud.adobe.com/content/maven/public/com/adobe/aem/commons/assetshare/2....

[ERROR] Failed to execute goal on project aem-assets.ui.apps: Could not resolve dependencies for project com.project.aem.assets:aem-assets.ui.apps:content-package:0.0.1-SNAPSHOT: C
ould not transfer artifact com.adobe.aem.commons:assetshare:zip:2.3.4 from/to maven-public-releases (https://repo1.maven.org/maven2 transfer failed for https://repo1.maven.org/m
aven2/com/adobe/aem/commons/assetshare/2.3.4/assetshare-2.3.4.zip: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid cert
ification path to requested target -> [Help 1]

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @PraveenKumarG, sorry for jumping into the discussion but based on the previous queries asked by you, I think this is an issue with the firewall access.
Can you try hitting the URL https://repo.maven.apache.org/maven2/ on the browser once?
It displays a director listing of the modules within but I suspect it will be restricted for you.
This occurs when the Java environment does not have a proper CA certificate path to the HTTPS server to verify that it is a valid website.

Try once the suggestion by @EstebanBustamante wherein you can use adobe-public profile along with -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

Hope this helps!

View solution in original post

13 Replies

Avatar

Community Advisor

Hi, 

You can find here how to correctly include ASC as part of your build for AEMaaCS: https://opensource.adobe.com/asset-share-commons/pages/getting-started/new-project/ 

Hope this helps



Esteban Bustamante

Avatar

Level 3

I have read this one but when following it I am getting the below-mentioned error!
[INFO] Scanning for projects...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] org.apache.maven.plugins/maven-metadata.xmlfailed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] org.codehaus.mojo/maven-metadata.xmlfailed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml

Avatar

Community Advisor

Hi, are you using the Adobe public profile? 

 mvn -PautoInstallPackage -Padobe-public clean install

Check this thread for more info as well: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/maven-build-error-could-no... 



Esteban Bustamante

Avatar

Level 3

yes @himanshu, one more point is even maven archetype generate is not working - 

mvn -B archetype:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ -D archetypeVersion=39 \ -D appTitle="My Asset Share" \ -D appId="my-asset-share" \ -D groupId="com.myassetshare"

 

[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\admin\.m2\repository), adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

Avatar

Employee

Your command has a incorrect '\' before the first -D.

Can you copy the command as is from and test? https://opensource.adobe.com/asset-share-commons/pages/getting-started/new-project/

mvn -B archetype:generate \
 -D archetypeGroupId=com.adobe.aem \
 -D archetypeArtifactId=aem-project-archetype \
 -D archetypeVersion=39 \
 -D appTitle="My Asset Share" \
 -D appId="my-asset-share" \
 -D groupId="com.myassetshare"



Avatar

Level 3

sorry got that wrong but still failing on downloading dependencies

C:\Codebase\demo-asset-share>mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=39 -D appTitle="My Asset Share" -D appId="my-asset-share" -D groupId="com.myassetshare"
[INFO] Scanning for projects...
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/m...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plu...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-p...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.3/ma...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugi...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-p...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2....
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-depe...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading from adobe-public-releases: https://repo.adobe.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public transfer failed for https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public transfer failed for https://repo.adobe.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] org.apache.maven.plugins/maven-metadata.xmlfailed to transfer from https://repo.adobe.com/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of adobe-public-releases has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public transfer failed for https://repo.adobe.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
[WARNING] org.apache.maven.plugins/maven-metadata.xmlfailed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] org.codehaus.mojo/maven-metadata.xmlfailed to transfer from https://repo.adobe.com/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of adobe-public-releases has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public transfer failed for https://repo.adobe.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
[WARNING] org.codehaus.mojo/maven-metadata.xmlfailed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2 transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.730 s
[INFO] Finished at: 2024-08-08T11:19:14+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\admin\.m2\repository), adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]

Avatar

Correct answer by
Community Advisor

Hi @PraveenKumarG, sorry for jumping into the discussion but based on the previous queries asked by you, I think this is an issue with the firewall access.
Can you try hitting the URL https://repo.maven.apache.org/maven2/ on the browser once?
It displays a director listing of the modules within but I suspect it will be restricted for you.
This occurs when the Java environment does not have a proper CA certificate path to the HTTPS server to verify that it is a valid website.

Try once the suggestion by @EstebanBustamante wherein you can use adobe-public profile along with -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

Hope this helps!

Avatar

Level 3

I checked this now - you are right the URL repo.maven is not accessible - does it mean its IT issue due to firewall restrictions?

Avatar

Community Advisor

Hi @PraveenKumarG, yes I believe it to be an IT restriction issue wherein the 3rd party dependencies are blocked. You might have to get it whitelisted or connect with the IT.

Avatar

Administrator

@PraveenKumarG Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni