Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

AEM 6.1: Back-end Developer Workshop -Video Training Sample Project Maven Error

Avatar

Level 2

I am currently taking the AEM 6.1 Back-end Developer Training course and I am stuck on the section "AEM 6.1 Back-end Developer Workshop", video "Installing and Configuring Eclipse". The video told me that if I was still having issues with maven at that point in the video then I needed to come to the forums for assistance. So here i am.

I tried to run "mvn clean install" on the practice project and got a bunch of maven dependency errors. Next the video told us to change the maven settings.xml file to add in a profile for adobe to access the public adobe maven repository. The settings file - which the video told us to add - was not in the student training files that were attached to the video. Therefore I found it online and added this profile to the xml file within <profiles></profiles>:

"<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>http://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>

        </properties>

        <repositories>

            <repository>

                <id>adobe-public-releases</id>

                <name>Adobe Public Repository</name>

                <url>http://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>http://repo.adobe.com/nexus/content/groups/public</url>

                <releases>

                    <enabled>true</enabled>

                    <updatePolicy>never</updatePolicy>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </pluginRepository>

        </pluginRepositories>

    </profile>"

Next I ran the command mvn clean install -P full and I still received a dependency error, only this time there were less Errors. Here is the error message in the console:

"C:\VideoTraining\company\sampleproject>mvn clean install -P full

[INFO] Scanning for projects...

[WARNING] The POM for com.day.jcr.vault:maven-vault-plugin:jar:0.0.6 is missing,

no dependency information available

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[WARNING] 'groupId' contains an expression but should be a constant. @ ${project

.parent.groupId}:${module.prefix}-core:[unknown-version], C:\VideoTraining\compa

ny\sampleproject\company-core\pom.xml, line 9, column 11

[WARNING] 'artifactId' contains an expression but should be a constant. @ ${proj

ect.parent.groupId}:${module.prefix}-core:[unknown-version], C:\VideoTraining\co

mpany\sampleproject\company-core\pom.xml, line 10, column 14

[WARNING] 'groupId' contains an expression but should be a constant. @ ${project

.parent.groupId}:${module.prefix}-ui:[unknown-version], C:\VideoTraining\company

\sampleproject\company-ui\pom.xml, line 9, column 11

[WARNING] 'artifactId' contains an expression but should be a constant. @ ${proj

ect.parent.groupId}:${module.prefix}-ui:[unknown-version], C:\VideoTraining\comp

any\sampleproject\company-ui\pom.xml, line 10, column 14

[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-plug

in:0.0.6 or one of its dependencies could not be resolved: Failure to find com.d

ay.jcr.vault:maven-vault-plugin:jar:0.0.6 in https://repo.maven.apache.org/maven

2 was cached in the local repository, resolution will not be reattempted until t

he update interval of central has elapsed or updates are forced @

@

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]

[ERROR]   The project com.adobe.training:company-ui:0.0.1-SNAPSHOT (C:\VideoTrai

ning\company\sampleproject\company-ui\pom.xml) has 1 error

[ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-

plugin:0.0.6 or one of its dependencies could not be resolved: Failure to find c

om.day.jcr.vault:maven-vault-plugin:jar:0.0.6 in https://repo.maven.apache.org/m

aven2 was cached in the local repository, resolution will not be reattempted unt

il the update interval of central has elapsed or updates are forced -> [Help 2]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[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 rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin

gException

[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerE

xception

C:\VideoTraining\company\sampleproject>"

I am unsure of how to fix this error. Could someone please assist me? Thank you.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Ok Ian, I have got it work!  I now get a BUILD SUCCESS.

Check out the following Maven article Maven – Guide to using Multiple Repositories

What was needed was some additional tagging in the settings.xml file....

<settings>

    <profiles>

        <profile>

            <id>adobe-public</id>

            ...

        </profile>

    </profiles>

    <activeProfiles>

        <activeProfile>adobe-public</activeProfile>

    </activeProfiles>

</settings>

This did the trick.  By using the <activeProfiles> tag you dont need to use "-P full", you can just run "mvn clean install" and it should work for you hopefully.

Cheers for the youtube link.  It looks like we are doing the same developer course

Cheers

Brendan

View solution in original post

12 Replies

Avatar

Former Community Member

Hi Ian,

I am having the same issue as you.  I am not been able to obtain the missing settings.xml file either (as you say this isn't in the available student files).

I haven't got to the second error yet but I will try now.  Can I ask where you found the settings.xml file online?

Cheers

Brendan

Avatar

Level 2

Good to see that someone else has the issues...Unfortunately, I don't think any Adobe people are going to get back to us on here anytime soon.

On another note, if you're looking for videos that are more of a developer tutorial/workshop into components, templates, design, etc... check out these videos (they're by the same guy that did the Adobe training videos - James Talbot). 1 Introduction - YouTube The order of the videos in the series are mixed up, but I've posted the order I'm using in the Introduction video discussion section. Hope it helps!

Regards,

Ian

Avatar

Correct answer by
Former Community Member

Ok Ian, I have got it work!  I now get a BUILD SUCCESS.

Check out the following Maven article Maven – Guide to using Multiple Repositories

What was needed was some additional tagging in the settings.xml file....

<settings>

    <profiles>

        <profile>

            <id>adobe-public</id>

            ...

        </profile>

    </profiles>

    <activeProfiles>

        <activeProfile>adobe-public</activeProfile>

    </activeProfiles>

</settings>

This did the trick.  By using the <activeProfiles> tag you dont need to use "-P full", you can just run "mvn clean install" and it should work for you hopefully.

Cheers for the youtube link.  It looks like we are doing the same developer course

Cheers

Brendan

Avatar

Level 2

Here is how i fixed it..

First i did what brendand72866780 suggesting i.e ( Not sure this is needed even.. but i kept anyway )

<activeProfiles>

        <activeProfile>adobe-public</activeProfile>

    </activeProfiles>

My Error was looking like this :

[ERROR] The build could not read 1 project -> [Help 1]                                                                                                                   

[ERROR]                                                                                                                                                                  

[ERROR]   The project com.adobe.training:company-ui:0.0.1-SNAPSHOT (c:\AEM-Video-Training\company\company-ui\pom.xml) has 1 error                           

[ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-plugin:0.0.6 or one of its dependencies could not be resolved: Could not find artifact org

.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.0-alpha8 in adobe-public-releases (http://repo.adobe.com/nexus/content/groups/public) -> [Help 2]                        

                                                                                                                                                                 

After the above thing,..i did the following and made it work :

1) Go to the .m2/repository/org\apache\jackrabbit\jackrabbit-jcr-commons\2.0-alpha8

2) Rename the files to make and remove "lastupdated" from the extension. Finally it should like below:

  • jackrabbit-jcr-commons-2.0-alpha8.jar
  • jackrabbit-jcr-commons-2.0-alpha8.pom

3) run "mvn clean install -P full" and see Build and deployment successful.

Looks like it was able to donwload the jackrabbit-jcr-commons version jars however it has wrong extension.. so giving compilation error.

i fixed it looking the maven error log.. Hope this helps

Avatar

Level 1

The artifact org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.0-alpha8 is no longer available in adobe's public repository.

in vaults parent pom file, i.e, .m2/repository/com/day/jcr/vault/parent/2.1.2/parent-2.1.2.pom, change the jackrabbit.version to 2.0.0

Hope this helps.

Avatar

Level 1

Another alternate solution is to modify in the ui pom.xml

<artifactId>maven-vault-plugin</artifactId><version>0.0.6</version>

To  <artifactId>maven-vault-plugin</artifactId><version>0.0.10</version>

Avatar

Level 3

Hi,

I understand this particular issue.

I have created a new company project that should work with AEM 6.2.

You can download it from here[1]. You can use mvn clean install -P full command to install.

I have also attached my settings.xml[2] file and I think that should help.

Please try this out and let me know.

Regards

Varun Mitra

[1]  Dropbox - company-project.zip

[2] Dropbox - settings.xml

Avatar

Level 1

Thank you. This worked. I updated the settings.xml file as you said and the build succeeded.

First I did what brendand72866780 suggested, and I was able to get

mvn clean install

to work. But a

mvn clean install -P full

would still fail. But I followed the advice to change the filename extensions of the jackrabbit-jcr-commons-2.0-alpha8 files, then I could successfully get the "full" version to build and it deployed to my AEM instance.

Alas, training site still isn't updated.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----