Closed johnvlittle closed 3 years ago
This looks to be an issue on Windows. Can you try forcing the profile: https://github.com/adobe/aem-guides-wknd/blob/master/dispatcher/pom.xml#L142
$ mvn clean install -PonWindows
$ mvn clean install -PonWindows
Thanks for the reply. Unfortunately, this gives the same error.
Thanks @johnvlittle I'll investigate on our side. Do you mind generating a new project using the: https://github.com/adobe/aem-project-archetype? I'm curious if you get the same build behavior:
mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=24 \
-D appTitle="My Site" \
-D appId="mysite" \
-D groupId="com.mysite"
@godanny86 Many thanks for the reply. Due to your command format, I am guessing you are on linux or osx? these two dont seem to have an issue - only windows seems to be broken.
This command:
mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=24 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite"
gives the following result:
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/xxx/.m2/repository/org/codehaus/groovy/groovy/2.4.16/groovy-2.4.16.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release No SDK version specified, trying to fetch latest Using AEM as a Cloud Service SDK version: 2020.11.4553.20201124T121539Z-201028 Creating content skeleton... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 43.750 s [INFO] Finished at: 2020-11-30T23:50:38+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: C:\dev\xxxx\mysite\mysite\dispatcher\src\conf.d\enabled_vhosts\default.vhost: A required privilege is not held by the client. -> [Help 1] [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/MojoFailureException
There are also a lot of warnings along the lines of:
[WARNING] Don't override file C:\dev\xxx\mysite\mysite\ui.frontend.react\pom.xml
Sadly, the "insert code" editor option gets the line endings wrong.
Ah ok, thanks @johnvlittle. I was able to reproduce the issue on the windows environment. Linx/macos seems to be ok. I'll continue to investigate to see if its something specific with the wknd project or if all projects generated by the https://github.com/adobe/aem-project-archetype have this issue.
In the mean time if you just want to build/develop locally you should be able to skip the enforcer with something like so:
mvn clean install -Denforcer.skip=true
Thanks - this builds with the skip=true, but I still get this error: The requested profile "autoinstallPackage" could not be activated because it does not exist. next step is to figure out how to get the build artifacts onto the author and publisher so that they can be viewed.
You might have a capitalization issue autoinstallPackage
vs. autoInstallPackage
. In any event the following command should be used for author:
mvn clean install -PautoInstallSinglePackage -Denforcer.skip=true
Publish:
mvn clean install -PautoInstallSinglePackagePublish -Denforcer.skip=true
More info about deployment in the https://github.com/adobe/aem-guides-wknd#how-to-build
This should be fixed with PR #202
Expected Behaviour
mvn clean install works without errors.
Actual Behaviour
[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]`
Reproduce Scenario (including but not limited to)
100% reproducable.
Also get the same error if I import the project into ecliipse and try to build there.
Steps to Reproduce
1) install latest java 11 2) set classpath for java 11 3) install latest maven. 4) clone this project 5) in root dir, run "mvn clean install" 6 Get the following error:
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) @ aem-guides-wknd.dispatcher.cloud --- [WARNING] Rule 0: 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.d/available_vhosts/default.vhost [WARNING] Rule 1: 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.d/dispatcher_vhost.conf [WARNING] Rule 2: 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.d/rewrites/default_rewrite.rules [WARNING] Rule 3: 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/available_farms/default.farm [WARNING] Rule 4: 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/cache/default_invalidate.any [WARNING] Rule 5: 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/cache/default_rules.any [WARNING] Rule 6: 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/clientheaders/default_clientheaders.any [WARNING] Rule 7: 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/dispatcher.any [WARNING] Rule 8: 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/filters/default_filters.any [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.1.1-SNAPSHOT: [INFO] [INFO] WKND Sites Project - Reactor Project ............... SUCCESS [ 0.398 s] [INFO] WKND Sites Project - Core .......................... SUCCESS [ 13.445 s] [INFO] WKND Sites Project - UI Frontend ................... SUCCESS [01:58 min] [INFO] WKND Sites Project - UI apps structure ............. SUCCESS [ 1.656 s] [INFO] WKND Sites Project - UI apps ....................... SUCCESS [ 23.033 s] [INFO] WKND Sites Project - UI content .................... SUCCESS [ 20.129 s] [INFO] WKND Sites Project - UI config ..................... SUCCESS [ 0.598 s] [INFO] WKND Sites Project - UI sample content ............. SUCCESS [ 10.582 s] [INFO] WKND Sites Project - All ........................... SUCCESS [ 4.615 s] [INFO] WKND Sites Project - Integration Tests ............. SUCCESS [ 10.781 s] [INFO] WKND Sites Project - Dispatcher .................... FAILURE [ 0.294 s] [INFO] WKND Sites Project - UI Tests ...................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:26 min [INFO] Finished at: 2020-11-27T00:55:32+01:00 [INFO] ------------------------------------------------------------------------ [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]
Platform and Version
Windows 10 pro
java version "11.0.9" 2020-10-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.9+7-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.9+7-LTS, mixed mode)
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\dev\apache-maven-3.6.3\bin.. Java version: 11.0.9, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.9 Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Sample Code that illustrates the problem
n/a
Logs taken while reproducing problem
see above