I am trying to make some changes in the content.xml and then deploy it using command " mvn clean install -PautoInstallPackage"
But the changes do not reflect on the content.
I have to uninstall the package and install the package manually only the changes are reflected.
Anyone know why?
===============================================
My project is called "testing"
I make changes (changing the description of component) in the content.xml at this path => \ui.content\src\main\content\jcr_root\content\testing\us\en\.content.xml
filter.xml under ui.content META-INF
<?xml version="1.0" encoding="UTF-8"?> <workspaceFilter version="1.0"> <filter root="/conf/testing" mode="merge"/> <filter root="/content/testing" mode="merge"/> <filter root="/content/dam/testing/asset.jpg" mode="merge"/> <filter root="/content/experience-fragments/testing" mode="merge"/> </workspaceFilter>
ui.content pom.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- | Copyright 2015 Adobe Systems Incorporated | | Licensed under the Apache License, Version 2.0 (the "License"); | you may not use this file except in compliance with the License. | You may obtain a copy of the License at | | http://www.apache.org/licenses/LICENSE-2.0 | | Unless required by applicable law or agreed to in writing, software | distributed under the License is distributed on an "AS IS" BASIS, | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | See the License for the specific language governing permissions and | limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- ====================================================================== --> <!-- P A R E N T P R O J E C T D E S C R I P T I O N --> <!-- ====================================================================== --> <parent> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <!-- ====================================================================== --> <!-- P R O J E C T D E S C R I P T I O N --> <!-- ====================================================================== --> <artifactId>testing.ui.content</artifactId> <packaging>content-package</packaging> <name>TESTING - UI content</name> <description>UI content package for TESTING</description> <!-- ====================================================================== --> <!-- B U I L D D E F I N I T I O N --> <!-- ====================================================================== --> <build> <plugins> <!-- ====================================================================== --> <!-- V A U L T P A C K A G E P L U G I N S --> <!-- ====================================================================== --> <plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <properties> <cloudManagerTarget>none</cloudManagerTarget> </properties> <group>com.adobe.aem.testing</group> <name>testing.ui.content</name> <packageType>content</packageType> <accessControlHandling>merge</accessControlHandling> <validatorsSettings> <jackrabbit-filter> <options> <validRoots>/conf,/content,/content/experience-fragments,/content/dam</validRoots> </options> </jackrabbit-filter> </validatorsSettings> <dependencies> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.ui.apps</artifactId> <version>${project.version}</version> </dependency> </dependencies> </configuration> </plugin> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <verbose>true</verbose> <failOnError>true</failOnError> </configuration> </plugin> </plugins> </build> <!-- ====================================================================== --> <!-- D E P E N D E N C I E S --> <!-- ====================================================================== --> <dependencies> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.ui.apps</artifactId> <version>${project.version}</version> <type>zip</type> </dependency> <dependency> <groupId>com.adobe.aem</groupId> <artifactId>uber-jar</artifactId> <classifier>apis</classifier> </dependency> </dependencies> </project>
Solved! Go to Solution.
Views
Replies
Total Likes
@fang_29 Try updating filter mode to update_properties.
Refer below link:
https://jackrabbit.apache.org/filevault/filter.html#:~:text=update_properties%3A%20Existing%20conten....
<filter root="/content/testing" mode="update_properties"/>
Its because of workspace filter rules, please check filter.xml file under following path in your project /apps/src/main/content/META-INF/vault/filter.xml, use appropriate mode based upon your use case. Refer https://jackrabbit.apache.org/filevault/filter.html for more information.
@fang_29 Great that you reached Adobe Communities.
Have you checked your filter.xml under Meta-INF and you see what kind of mode you have in it? It might be in merge mode.
@Shashi_Mulugu @krati_garg Generally, merge mode is used in every project just to update the new content changes, but how can these issues(new content not updating) be resolved when using merge mode?
It depends on the type of artifacts maintained under each path? We generally split or configure the filter.xml based on type of artifacts under each path and based onnthem we use different modes for different paths. Not all fits under same mode.
Agreed.
A snapshot of filter.xml would clear these doubts. What kind of filter mode is in play.
Also, the content in above query is getting installed manually, if that is the case, the issue could be in filter root path or pom.xml
You might troubleshoot with below points
- Hope the content path where you are making changes is included in filter.xml.
- Are there any errors in maven build?
If none of these fix the issue, please share your pom.xml, filter.xml, Project Structure and point the location where you are making changes in content.xml.
Ok, so my project is called "testing"
I make changes (changing the description of component) in the content.xml at this path => \ui.content\src\main\content\jcr_root\content\testing\us\en\.content.xml
filter.xml under ui.content META-INF
<?xml version="1.0" encoding="UTF-8"?> <workspaceFilter version="1.0"> <filter root="/conf/testing" mode="merge"/> <filter root="/content/testing" mode="merge"/> <filter root="/content/dam/testing/asset.jpg" mode="merge"/> <filter root="/content/experience-fragments/testing" mode="merge"/> </workspaceFilter>
ui.content pom.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- | Copyright 2015 Adobe Systems Incorporated | | Licensed under the Apache License, Version 2.0 (the "License"); | you may not use this file except in compliance with the License. | You may obtain a copy of the License at | | http://www.apache.org/licenses/LICENSE-2.0 | | Unless required by applicable law or agreed to in writing, software | distributed under the License is distributed on an "AS IS" BASIS, | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | See the License for the specific language governing permissions and | limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- ====================================================================== --> <!-- P A R E N T P R O J E C T D E S C R I P T I O N --> <!-- ====================================================================== --> <parent> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <!-- ====================================================================== --> <!-- P R O J E C T D E S C R I P T I O N --> <!-- ====================================================================== --> <artifactId>testing.ui.content</artifactId> <packaging>content-package</packaging> <name>TESTING - UI content</name> <description>UI content package for TESTING</description> <!-- ====================================================================== --> <!-- B U I L D D E F I N I T I O N --> <!-- ====================================================================== --> <build> <plugins> <!-- ====================================================================== --> <!-- V A U L T P A C K A G E P L U G I N S --> <!-- ====================================================================== --> <plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <properties> <cloudManagerTarget>none</cloudManagerTarget> </properties> <group>com.adobe.aem.testing</group> <name>testing.ui.content</name> <packageType>content</packageType> <accessControlHandling>merge</accessControlHandling> <validatorsSettings> <jackrabbit-filter> <options> <validRoots>/conf,/content,/content/experience-fragments,/content/dam</validRoots> </options> </jackrabbit-filter> </validatorsSettings> <dependencies> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.ui.apps</artifactId> <version>${project.version}</version> </dependency> </dependencies> </configuration> </plugin> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <verbose>true</verbose> <failOnError>true</failOnError> </configuration> </plugin> </plugins> </build> <!-- ====================================================================== --> <!-- D E P E N D E N C I E S --> <!-- ====================================================================== --> <dependencies> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.adobe.aem.testing</groupId> <artifactId>testing.ui.apps</artifactId> <version>${project.version}</version> <type>zip</type> </dependency> <dependency> <groupId>com.adobe.aem</groupId> <artifactId>uber-jar</artifactId> <classifier>apis</classifier> </dependency> </dependencies> </project>
@fang_29 Try updating filter mode to update_properties.
Refer below link:
https://jackrabbit.apache.org/filevault/filter.html#:~:text=update_properties%3A%20Existing%20conten....
<filter root="/content/testing" mode="update_properties"/>
Hi, I update the filter mode to "replace" based on my need. And it works. Thank you so much
@fang_29 But in real time scenarios, you should never use replace mode(Merge mode is recommended), because there is a very high changes of content loss upon every code deployment/build.
@Prashanth_02a But it gives me error if I am using update_properties
[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.6:generate-metadata (default-generate-metadata) on project testing.ui.content: java.io.IOException: org.apache.jackrabbit.vault.fs.config.ConfigurationException: Invalid value given for attribute 'mode': No enum constant org.apache.jackrabbit.vault.fs.api.ImportMode.UPDATE_PROPERTIES -> [Help 1]
@fang_29 did you get this working? what was the solution
Views
Replies
Total Likes
@fang_29 im getting the same error. were you able to resolve this? can you let me know?
Views
Replies
Total Likes
@krati_garg I think this doesn't work. As many have mentioned below it gives an error No enum constant org.apache.jackrabbit.vault.fs.api.ImportMode.UPDATE_PROPERTIES .
Is there any solution for this issue ?
Any solution for this ?
Views
Replies
Total Likes