Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

While building existing AEM archetype project throwing an error

Avatar

Level 3

Build-error.PNGHi,

I am using AEM 6.1 and  took the aem archetype project from the official website of AEM which is maven-archetype-master . When i am trying to build the project with mvn-clean-install it is throwing the below error

[ERROR] Plugin org.apache.maven.plugins:maven-source-plugin:3.0.1 or one of its

dependencies could not be resolved: Failed to read artifact descriptor for org.a

pache.maven.plugins:maven-source-plugin:jar:3.0.1: Could not transfer artifact o

rg.apache.maven.plugins:maven-source-plugin:pom:3.0.1 from/to central (https://r

epo.maven.apache.org/maven2): proxy.host.net -> [Help 1]

earlier i was using maven 3.5.0 but later changed it to version 3.0.1 but still issue persist.

Could someone please help on the same , i have been trying it from so long but could not resolve it .

Is it because maven is not able to download the plugin from the repository? if yes then how it can be resolved?

any help on this would be really appreciated.

Thanks

Ranjna

1 Accepted Solution

Avatar

Correct answer by
Level 10

I just tested the above article. I changed to use UBER 6.1 in the POM. It worked:

AEM61A.png

Deployed to AEM using mvn -PautoInstallPackage install

View solution in original post

20 Replies

Avatar

Level 10

Hi Ranjna,

Could you tell us from where you downloaded that project, so that we could also test the same.

Thanks,

Ratna.

Avatar

Correct answer by
Level 10

I just tested the above article. I changed to use UBER 6.1 in the POM. It worked:

AEM61A.png

Deployed to AEM using mvn -PautoInstallPackage install

Avatar

Employee Advisor

In your error message I see the string "proxy.host.net" ... which makes me think that you have configured a proxy, which is likely non existent.

Please validate your maven setup not to use any proxy or configure the correct proxy.

Jörg

Avatar

Level 3

Hi

i took the package from github repository and based on your comment changed the Uber jar 6.1 but still the build is getting failure . now i am facing the below error

build-failure.PNG

Avatar

Level 10

Try following the artilce i listed above. I just tested yesterday and it worked perfectly. Also - if you have another computer try that too. Make sure its not your environment.

Avatar

Level 3

Yes i am doing it in my local system not on any environment and

i just had few questions

Is this the build from scratch?

do i need to follow the same folder structure ?

Do i need a pom.xml in the blank folder to build the archetype?

is this the correct way to use the command when opening a cmd

C:\AdobeCQ>mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetype

s -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=10 -DarchetypeR

epository=https://repo.adobe.com/nexus/content/groups/public/ -DgroupId=AEM62App

-DartifactId=echo62 -Dversion=1.0-SNAPSHOT -Dpackage=com.aem.community -DappsFo

lderName=AEM62App -DartifactName=AEM62App -DcomponentGroupName=AEM62 -DcontentFo

lderName=AEM62App -DcssId=AEM62CSS -DpackageGroup=AEM62App -DsiteName=AEM62App

build.PNG

Avatar

Level 10

The C:\AdobeCQ is only a example windows based path i use when creating Maven Projects-  you can use what ever path you want.

FOr Maven 10 -- use this command:

mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=10 -DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/

Then fill in the input values as you see in the article --

Adobe Experience Manager Help | Creating your first Adobe Experience Manager 6.2 Project using Adobe...

This will build a project from scratch that you can them import into AEM using this command

mvn -PautoInstallPackage -install

You see that too in the article

FOllow all the steps and you will get the example project into AEM.

Avatar

Level 3

Thanks for sharing the video . I understood the process that after executing the maven command it should prompt for the input values but it is not happening in my case and it shows the below error

Is it because of maven version which i am using(3.0.1)

1354795_pastedImage_0.png

Avatar

Level 3

Yes, i have placed the same pom.xml mentioned in the article  in .m2 folder

Avatar

Level 3

i am sorry , i meant settings.xml

Avatar

Level 3

ok . ill try with the same version

Avatar

Level 10

Looks like something is wrong with your settings.xml -

AERR.png

Avatar

Level 10

Try setting up Maven again and .m2. Use a new settings. xml file and follow this...

How to set up the Adobe Maven Repository

I think issue is that.

Avatar

Level 3

Hi

Issue got resolved

I used the same version of maven (3.3.9) mentioned by you and then deleted the old repository from .m2 folder and started building again

thank you so much for help

kind regards,

Ranjna

Avatar

Level 10

I am very happy you got it working!