Why my content changes is not updated after deploy? | Community
Skip to main content
Level 2
November 1, 2022
Solved

Why my content changes is not updated after deploy?

  • November 1, 2022
  • 3 replies
  • 7442 views

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>

 

Best answer by krati_garg

@fang_29 Try updating filter mode to update_properties.

Refer below link:
https://jackrabbit.apache.org/filevault/filter.html#:~:text=update_properties%3A%20Existing%20content%20is%20updated%2C%20new%20content%20is%20added%20and%20none%20is%20deleted.

 

 <filter root="/content/testing" mode="update_properties"/>

 

3 replies

Level 3
November 1, 2022

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.  

Shashi_Mulugu
Community Advisor
Community Advisor
November 1, 2022

@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.

 

https://jackrabbit.apache.org/filevault/filter.html

Level 3
November 1, 2022

@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?

Shashi_Mulugu
Community Advisor
Community Advisor
November 1, 2022

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.

krati_garg
Adobe Employee
Adobe Employee
November 1, 2022

@fang_29 

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. 

 

fang_29Author
Level 2
November 1, 2022

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>

 

Level 3
November 2, 2022

@prashanthal 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 I don't think update_properties will work.