I have tried everything to get this added to my application.xml file, but the maven-ear-plugin will just not recognize the application name property testEar in my pom file.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<generateApplicationXml>true</generateApplicationXml>
<applicationName>testEAR</applicationName>
<earSourceDirectory>${basedir}/src/main/resources</earSourceDirectory>
<resourcesDir>target/classes</resourcesDir>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<JarModule>
<groupId>org</groupId>
<artifactId>test-client</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
</JarModule>
</modules>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
I determined that the maven ear plugin by default was creating a non-EE6 application.xml, which does not support application-name.
I needed to add a new xml element (version) to the ear plugin to specify EE6.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<generateApplicationXml>true</generateApplicationXml>
<applicationName>testEAR</applicationName>
<earSourceDirectory>${basedir}/src/main/resources</earSourceDirectory>
<resourcesDir>target/classes</resourcesDir>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<JarModule>
<groupId>org</groupId>
<artifactId>test-client</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
</JarModule>
</modules>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin> </plugins>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With