Steps

To create a package that installs a new version of an OSGi bundle and deletes the older version, you can use a filter like this:

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/myapp/install">
        <exclude pattern="/apps/myapp/install/.*"/>
        <include pattern="/apps/myapp/install/custombundle-.*"/>
    </filter>
</workspaceFilter>

Here's an example scenario for the filter above:

  1. Create a package using the filter above, the package should only contain one file /apps/myapp/install/custombundle-2.0.0.jar
  2. When you upload and install the package, AEM already has the older version installed /apps/myapp/install/custombundle-1.0.0.jar.
  3. When the package is installed, it deletes /apps/myapp/install/custombundle-1.0.0.jar and install /apps/myapp/install/custombundle-2.0.0.jar instead without affecting any other files under /apps/myapp/install.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책