Fresh setup a local AEM development environment not working: No marketplace entries found to handle maven-clean-plugin:3.0.0:clean and "] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce" in eclipse

Avatar

Avatar

nutmix

Avatar

nutmix

nutmix

26-11-2020

I have followed this guide to the letter on a clean windows pc: https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/development/set-up-a-loc... 

So have a running author jar, mvn and java installed, eclipse EE setup with the sling and aem "dev tools"

The final step of the instructions is to import the "completed wknd" tutorial. However, the wknd tutorial requires the dev env setup, and dev env setup requires the tutorial.

As a way out of this, I downloaded the source zip from https://github.com/adobe/aem-guides-wknd/releases/tag/aem-guides-wknd-0.0.6

Then I did "file->import->existing maven projects" on the source dir.

But it wont import.

It pops up the error "No marketplace entries found to handle maven-clean-plugin:3.0.0:clean in Eclipse.  Please see Help for more information"

The instructions are also missing two critical steps: 

  1. when you do a fresh install of eclipse, you have to add a jdk under window->preferences->installed JREs
  2. When you create a new run configuration, you have to go to the JRE tab and change it from the default "alternate JRE" to "workspace default jdk".

When I try to run the "install WKND pacakge" configuraiton, I get 3 errors:

 

  1. The requested profile "autoinstallPackage" could not be activated because it does not exist.
  2. No marketplace entries found to handle maven-clean-plugin:3.0.0:clean
  3. Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project aem-guides-wknd.dispatcher.cloud: Some Enforcer rules have failed.

Here is an example output with the errors:

 

 

[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
[WARNING] Rule 10: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/virtualhosts/default_virtualhosts.any
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WKND Sites Project - Reactor Project 0.0.6:
[INFO] 
[INFO] WKND Sites Project - Reactor Project ............... SUCCESS [  0.274 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [ 37.125 s]
[INFO] WKND Sites Project - UI Frontend ................... SUCCESS [02:27 min]
[INFO] WKND Sites Project - UI apps structure ............. SUCCESS [  1.010 s]
[INFO] WKND Sites Project - UI apps ....................... SUCCESS [  6.714 s]
[INFO] WKND Sites Project - UI content .................... SUCCESS [  4.449 s]
[INFO] WKND Sites Project - UI config ..................... SUCCESS [  0.254 s]
[INFO] WKND Sites Project - UI sample content ............. SUCCESS [  7.927 s]
[INFO] WKND Sites Project - All ........................... SUCCESS [  3.501 s]
[INFO] WKND Sites Project - Integration Tests ............. SUCCESS [05:31 min]
[INFO] WKND Sites Project - Dispatcher .................... FAILURE [  0.109 s]
[INFO] WKND Sites Project - UI Tests ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  09:02 min
[INFO] Finished at: 2020-11-26T17:54:40+01:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "autoinstallPackage" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project aem-guides-wknd.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

 

 

i notice it says "displatcher.cloud".  Why cloud? I am running a local install, nothing to do with cloud?

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

26-11-2020

You can just go to parent pom.xml, and comment out the "dispatcher.cloud" module. Next, mvn clean install again. Since you do not have the correct profile, head into ui.apps/target/.*.zip, and upload it manually into AEM using the package manager. Your build logs looks fine, except for the dispatcher.cloud maven module.

Answers (1)

Answers (1)

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

26-11-2020

Hi @nutmix 

Import the main folder(aem-guides-wknd-aem-guides-wknd-0.0.6) which has parent pom.xml. 

Screenshot 2020-11-26 at 8.33.17 PM.png

Update your Compiler plugin as below

<!-- Maven Compiler Plugin -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <verbose>true</verbose>
    </configuration>
</plugin>

nutmix
Thanks for the reply. I already imported this directory and eclipse picks up all the pom files, and this is what gives that missing clean error. Which file shall I edit to set the compiler??
Anudeep_Garnepudi
Update the Maven Compiler Plugin in parent pom.xml as above and try to build
nutmix

interestingly, this is whats in there now:

 

            <!-- Maven Compiler Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>1.8</release>
                </configuration>
            </plugin>

                <!-- Maven Compiler Plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>

 

I do have java 11 installed, but I dont know how maven knows where to get it from, as I had to switch from java 11 to java 8 to get the publisher to work.

you are suggesting I add "source" and "target", but currently it only has "release".  Also, the artifact is in the pom twice.

Anudeep_Garnepudi
The WKND project was built on Java 11, as you are using Java 8 remove the release tag and add above configuration.
Anudeep_Garnepudi

Update this

<!-- Maven Compiler Plugin -->

<plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-compiler-plugin</artifactId>

    <configuration>

        <release>11</release>

    </configuration>

</plugin>

with

<!-- Maven Compiler Plugin -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <verbose>true</verbose>
    </configuration>
</plugin>

nutmix

ok, tried the updated pom with 1.8, same error. So I switched back to java 11 on the command line, JAVA_HOME, eclipse defautl JDK and the JDK for the run config.

Now it gets further but fails with this:

[WARNING] The requested profile "autoinstallPackage" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project aem-guides-wknd.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

 

Anudeep_Garnepudi

I am able to build successfully with Java 8

Screenshot 2020-11-26 at 11.26.54 PM.png

nutmix
if you can build, and I cant, it could be anything. I may have been given a bad or wrong quickstart.jar, I may have a version of java which it doesnt work for, I my require an undocumented setting in eclipse, it may be different versions of the wknd project (I had no idea where to get it from so took a complete guess). I followed the tutorial to the letter, although it has several missing steps and critical missing information.
nutmix

Anudeep, could you tell me exactly where you got your copy of wknd from? Exactly which dir/files? I seem to have some cloud version, and I dont have the ckould SDK, only local jar.

Could you also confirm if you are running the clould SDK, or the non cloud sdk? I only have the non cloud.

Anudeep_Garnepudi
Try building the project from command prompt, your eclipse build in Maven and Java versions might be different. Building from command prompt could solve your issue.