Using JavaEE application clients

JavaEE application clients are handled by the maven-acr-plugin with the 'app-client' packaging type. Since this packaging is new to Maven, you have to enable the extensions of the acr plugin for Maven to discover it. This sample below describes what needs to be added to your project for a 'app-client-sample' application client. By default the ear plugin adds any application client to the generated application.xml just like it does for other JavaEE packaging types.

  <dependencies>
    <dependency>
      <groupId>com.foo</groupId>
      <artifactId>app-client-sample</artifactId>
      <version>1.0</version>
      <type>app-client</type>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-acr-plugin</artifactId>
        <version>1.0</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>