0 Replies Latest reply on Jul 30, 2018 8:00 AM by Camille Lola

    Why Single AEM JCR package for multi-module project?

    Camille Lola

      I am working as AEM Developer, I have an AEM project organized similarly to Adobe's core components project, in which the all module is in charge of building the zip that contains an embedded .jar of the bundle, and two sub packaged .zip content-packages.

       

      When uploaded and installed to AEM via a package manager, the single zip created in all/target explodes to its 3 sub packages (core, content, and config). I want to create a single zip that keeps my project's footprint as a single package in AEM package manager.

       

      Here is the relevant bits of my all/pom.xml (same as Adobe's core components all/pom.xml):

       

      <plugin>
       
      <groupId>com.day.jcr.vault</groupId>
       
      <artifactId>content-package-maven-plugin</artifactId>
       
      <extensions>true</extensions>
       
      <configuration>
       
      <verbose>true</verbose>
       
      <group>myApp</group>
       
      <failOnError>true</failOnError>
       
      <builtContentDirectory>target/${project.artifactId}</builtContentDirectory>
       
      <embeddeds>
       
      <embedded>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.core</artifactId>
       
      <target>/apps/myApp/install</target>
       
      <filter>true</filter>
       
      </embedded>
       
      </embeddeds>
       
      <failOnMissingEmbed>true</failOnMissingEmbed>
       
      <subPackages>
       
      <subPackage>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.content</artifactId>
       
      <filter>true</filter>
       
      </subPackage>
       
      <subPackage>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.config</artifactId>
       
      <filter>true</filter>
       
      </subPackage>
       
      </subPackages>
       
      </configuration>
      </plugin>

       

      <dependencies>
       
      <dependency>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.core</artifactId>
       
      <version>${project.version}</version>
       
      <scope>provided</scope>
       
      </dependency>
       
      <dependency>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.content</artifactId>
       
      <version>${project.version}</version>
       
      <type>zip</type>
       
      <scope>provided</scope>
       
      </dependency>
       
      <dependency>
       
      <groupId>${project.groupId}</groupId>
       
      <artifactId>myApp.config</artifactId>
       
      <type>zip</type>
       
      <version>${project.version}</version>
       
      <scope>provided</scope>
       
      </dependency>
      </dependencies>

       

       

      Thanks & Regards

      Camillelola