我对 AEM/CRX/JCR 的东西比较陌生,所以我觉得可能只是缺少一些基本的东西,但我在任何地方都找不到答案。我已经看过这个问题了。
这是问题:
- 我从本地文件系统更改了一些 .content.xml 文件(例如 jcr:title="NewValue")中的属性值。
- 我运行
mvn clean install -Pauto-deploy
(自动部署配置文件信息附在下面) - 完成后,我打开http://localhost:4502/crx/de/index.jsp并导航到我修改的 jcr:content 节点。
- 仍显示属性的旧值(例如 jcr:title="OldValue")。
如果我使用 CRXDE lite 删除 jcr:content 节点,然后再次运行 maven,则节点显示更新后的值很好。所以我知道该节点正在从我的本地文件系统移动到 CRX 中,当已经存在一个值时,它似乎并没有被覆盖。我觉得一定有一些我遗漏或实施不正确的设置。
如果需要更多信息,请告诉我。请注意,我不想直接使用vlt
,因为我们的构建管道使用 maven。在此先感谢您的帮助!
自动部署配置文件(保险库插件配置)
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<version>0.0.10</version>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<verbose>true</verbose>
<packageFile>${project.build.directory}/${project.build.finalName}.zip</packageFile>
<targetURL>http://${cq.host}:${cq.port}/crx/packmgr/service.jsp</targetURL>
<userId>${cq.user}</userId>
<password>${cq.password}</password>
<properties>
<acHandling>Overwrite</acHandling>
</properties>
</configuration>
</execution>
</executions>
</plugin>
编辑maven-resources-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-content-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vault-work</outputDirectory>
<warSourceExcludes>**/*.scss</warSourceExcludes>
<resources>
<resource>
<directory>${basedir}/src/main/content</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/.svn</exclude>
<exclude>**/.vlt</exclude>
<exclude>**/*.scss</exclude>
<exclude>**/.vltignore</exclude>
<exclude>**/.DS_Store</exclude>
<exclude>**/*.scss</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
编辑我意识到可能值得注意的是,我尝试修改和推送的 .content.xml 文件位于 /etc/designs 中。