【发布时间】:2021-10-23 08:29:05
【问题描述】:
一点上下文: 我是 AEM 项目的 FE 开发人员。该项目是作为云服务的 SPA AEM。我正在从命令行运行作者实例。
我的电脑规格是:
- CPU:Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz 3.00 GHz
- 内存:24.0 GB
- 固态硬盘:476 GB
- 操作系统:Windows 10 专业版
对于我们正在使用的 AEM 项目
- Java SDK 11
- Maven 3.6.3
我已经设置了一切,路径变量,JAVA_HOME,mvn。所有这些都可以正常工作,甚至尝试使用“旧”版本的 AEM(如 6.5)构建其他类型的项目也可以完美构建。我对他们没有问题。但是使用此版本的 AEM,我收到此错误
[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 xxxxxx 1.0.0-SNAPSHOT:
[INFO]
[INFO] xxxxxx ................................. SUCCESS [ 0.270 s]
[INFO] xxxxxx - Core .......................... SUCCESS [ 59.232 s]
[INFO] xxxxxx - UI Frontend ................... SUCCESS [ 19.876 s]
[INFO] xxxxxx - UI Frontend React ............. SUCCESS [ 39.613 s]
[INFO] xxxxxx - Repository Structure Package .. SUCCESS [ 0.991 s]
[INFO] xxxxxx - UI apps ....................... SUCCESS [ 12.990 s]
[INFO] xxxxxx - UI content .................... SUCCESS [ 4.178 s]
[INFO] xxxxxx - UI config ..................... SUCCESS [ 0.314 s]
[INFO] xxxxxx - All ........................... SUCCESS [ 1.052 s]
[INFO] xxxxxx - Integration Tests ............. SUCCESS [ 12.166 s]
[INFO] xxxxxx - Dispatcher .................... FAILURE [ 0.030 s]
[INFO] xxxxxx - UI Tests ...................... SKIPPED
[INFO] xxxxxx - Project Analyser .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:34 min
[INFO] Finished at: 2021-08-22T15:11:20-05: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 xxxxxxx.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :xxxxxx.dispatcher.cloud
我一直在网站上搜索,这个问题的一些答案对我不起作用。
- 我尝试从“gitbash”运行所有内容 命令行和我有同样的问题。
- 我尝试更改 pom.xml 中的版本,没有成功。
- 我尝试使用 Eclipse IDE 和所有内置工具构建项目,我收到一个错误 org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce 不见了
- 禁用防火墙和防病毒软件,不行
- 使用其他版本的 maven,例如 3.8.2
- 删除.m2目录,重新下载所有插件,无效
许多答案中的一个告诉我在 pom.xml 中注释掉调度程序模块,并且在我这样做之后构建良好。其他人也在这样做,并使用 crx 包管理器上传 ui.apps/target/*.zip 我做到了,但我不确定结果是否是“最好的” ”。 最后,我在 Mac Pro 中安装了相同的项目,并且没有问题。我希望有人可以帮助我。感谢阅读。
【问题讨论】:
-
这是个好问题,为什么人们倾向于-1呢?