Adobe-Marketing-Cloud / aem-guides-wknd

Steps to create a website with Adobe Experience Manager (AEM)
https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop.html
76 stars 68 forks source link

AEM6.4 - aem-guides-wknd - Project is having build and dependency issues #21

Closed munikmca closed 6 years ago

munikmca commented 6 years ago

Hi,

I have tried to clone and build(mvn clean install -PautoInstallPackage) this project, but getting maven dependency issues. Please refer the error log below.

#############################

[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Could not find artifact com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in central (https://repo.maven.apache.org/maven2) @ [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.apps:[unknown-version], /Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.apps/pom.xml, line 34, column 16 [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Could not find artifact com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in central (https://repo.maven.apache.org/maven2) @ [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.content:[unknown-version], /Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.content/pom.xml, line 34, column 16 @ [ERROR] The build could not read 2 projects -> [Help 1] [ERROR]
[ERROR] The project com.adobe.aem.guides:aem-guides-wknd.ui.apps:0.0.1-SNAPSHOT (/Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.apps/pom.xml) has 2 errors [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Could not find artifact com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in central (https://repo.maven.apache.org/maven2) -> [Help 2] [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.apps:[unknown-version], /Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.apps/pom.xml, line 34, column 16 [ERROR]
[ERROR] The project com.adobe.aem.guides:aem-guides-wknd.ui.content:0.0.1-SNAPSHOT (/Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.content/pom.xml) has 2 errors [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Could not find artifact com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in central (https://repo.maven.apache.org/maven2) -> [Help 2] [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.content:[unknown-version], /Users/brian.walker/ServiceNow/git-projects/aem-guides-wknd/ui.content/pom.xml, line 34, column 16 [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

godanny86 commented 6 years ago

Hi @munikmca, Have you set up a settings.xml file beneath your ~/.m2 directory? In it you need to add the Adobe Public Repos to your settings file. See https://helpx.adobe.com/experience-manager/kb/SetUpTheAdobeMavenRepository.html for details.

Let me know if this fixes the issue and I will update the tutorial instructions in Part 1.

pankajchhatri commented 6 years ago

Use mvn -PautoInstallPackage -Padobe-public clean install command.

IlOvOII commented 6 years ago

Hi @godanny86 I have the same problem, but I still can't solve it according to what you said.

IlOvOII commented 6 years ago

Hello @pankajchhatri Can you solve this problem? I didn't succeed in using your suggested method.

godanny86 commented 6 years ago

@IlOvOII you have updated your ~/.m2/settings file to include repo.adobe.com?

I am traveling this month so my response may be delayed. @davidjgonzalez might also be able to assist...

IlOvOII commented 6 years ago

Hello @davidjgonzalez Yes, I had update setting file.But there's the same problem.

davidjgonzalez commented 6 years ago

@IlOvOII can you paste the profile from your ~/.m2/settings.xml for the adobe public repo? Since your failing on resolving a plugin dependency, I assume you've doubled checked that the pluginReposistory configuration?

Mine looks like ...

        <profile>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <id>adobe-public</id>
            <repositories>
                <repository>
                    <id>adobe-public-releases</id>
                    <name>Adobe Public Repository</name>
                    <url>https://repo.adobe.com/nexus/content/groups/public/</url>
                    <layout>default</layout>
                </repository>
                <repository>
                     <id>central</id>
                     <url>http://repo1.maven.org/maven2/</url>
                     <layout>default</layout>
                     <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>
                    <layout>default</layout>
                </pluginRepository>
            </pluginRepositories>
        </profile>
IlOvOII commented 6 years ago

@davidjgonzalez

settings.xml:

    <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 Basel 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 Basel 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>

The entire text is below. settings.txt

The error log is below.

D:\AEMtest\aem-guides-wknd>mvn -PautoInstallPackage clean install [INFO] Scanning for projects... [WARNING] The POM for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 is missing, no dependency information available [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.apps:[unknown-version], D:\AEMtest\aem-guides-wknd\ui.apps\pom.xml, line 34, column 16 [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.content:[unknown-version], D:\AEMtest\aem-guides-wknd\ui.content\pom.xml, line 34, column 16 @ [ERROR] The build could not read 2 projects -> [Help 1] [ERROR] [ERROR] The project com.adobe.aem.guides:aem-guides-wknd.ui.apps:0.0.1-SNAPSHOT (D:\AEMtest\aem-guides-wknd\ui.apps\pom.xml) has 2 errors [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2] [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.apps:[unknown-version], D:\AEMtest\aem-guides-wknd\ui.apps\pom.xml, line 34, column 16 [ERROR] [ERROR] The project com.adobe.aem.guides:aem-guides-wknd.ui.content:0.0.1-SNAPSHOT (D:\AEMtest\aem-guides-wknd\ui.content\pom.xml) has 2 errors [ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2] [ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd.ui.content:[unknown-version], D:\AEMtest\aem-guides-wknd\ui.content\pom.xml, line 34, column 16 [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

davidjgonzalez commented 6 years ago

@IlOvOII use mvn help:all-profiles -Padobe-public -PautoInstallPackage to verify that your profile is indeed active under that name - you should see: Profile Id: adobe-public (Active: true , Source: settings.xml)

If not, theres a problem w your settings.xml definition.

You can also try:

  1. Set <activeByDefault>true</activeByDefault> and <activeProfile>adobe-public</activeProfile> - this should FORCE that profile to be true no matter what.. you can again validate this by running mvn help:all-profiles after making that change.

  2. Comment our your adobe-public and copy/paste mine in .. i dont see why yours wouldnt work, but nothing is jumping out as the obvious problem either.

IlOvOII commented 6 years ago

@davidjgonzalez Thank you very much! I successfully deployed it after using your advice 1.

dhulipudi commented 6 years ago

I am also getting same issue - I have maven 3.3.9 and my settings.xml is below.

=================settings.xml=========== <?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

adobe-public true adobe-public-releases Adobe Public Releases https://repo.adobe.com/nexus/content/groups/public adobe-public-releases Adobe Basel Public Repository https://repo.adobe.com/nexus/content/groups/public true never false adobe-public-releases Adobe Basel Public Repository https://repo.adobe.com/nexus/content/groups/public true never false adobe-public

dhulipudi commented 6 years ago

Now, I am able to build the project successfully.

Mohd-Aamir-M commented 5 years ago

Use mvn -PautoInstallPackage -Padobe-public clean install command.

It works but gives another error:

package javax.annotation does not exist

godanny86 commented 5 years ago

Use mvn -PautoInstallPackage -Padobe-public clean install command.

It works but gives another error:

package javax.annotation does not exist

hi @Mohd-Aamir-M do you mind creating a new issue for this? Please detail the AEM version, Java version, maven version...

Mohd-Aamir-M commented 5 years ago

Hi @godanny86 , Here is my configuration.

JAVA

java 11.0.1 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

MAVEN 3.6.0

I have created a project from this command. mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=13 -DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/

Archtype version 13.

godanny86 commented 5 years ago

Hi @Mohd-Aamir-M , currently the tutorial doesn't support Java 11. We are close to releasing an update. In the mean time, you can downgrade to Java 8 or you can try generating the project using Archetype version 18: https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-18. Not everything will match exactly but you should still be able to follow the tutorial...

In the future, please create a New Issue...

Mohd-Aamir-M commented 5 years ago

Hi @Mohd-Aamir-M , currently the tutorial doesn't support Java 11. We are close to releasing an update. In the mean time, you can downgrade to Java 8 or you can try generating the project using Archetype version 18: https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-18. Not everything will match exactly but you should still be able to follow the tutorial...

In the future, please create a New Issue...

Ok, i am going to try with Java 8. Thanks and i am following this tutorial. https://helpx.adobe.com/experience-manager/using/maven_arch13.html

Correct me please, if I am doing something wrong.

Mohd-Aamir-M commented 5 years ago

Hi @Mohd-Aamir-M , currently the tutorial doesn't support Java 11. We are close to releasing an update. In the mean time, you can downgrade to Java 8 or you can try generating the project using Archetype version 18: https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-18. Not everything will match exactly but you should still be able to follow the tutorial...

In the future, please create a New Issue...

Do i have to install AEM seperate or it is installed automatically when i run following command for community version. I am using Mac. Today, when i tried to install the we retail demo it thrown error: connection refused.

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