Unpacking A Module

If you need to unpack artifacts in the generated EAR, you can configure it in two ways:

  • Specify the unpack attribute on the required artifact(s)
  • Specify the comma separated list of types to unpack by default

    Note that artifacts are unpacked according to their respective URI.

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.8</version>
            <configuration>
              <modules>
                <sarModule>
                  <groupId>artifactGroupId</groupId>
                  <artifactId>artifactId</artifactId>
                  <unpack>true</unpack>
                </sarModule>
              </modules>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.8</version>
            <configuration>
              <unpackTypes>rar,war,ejb</unpackTypes>
              [...]
            </configuration>
          </plugin>
        </plugins>
      </build>