Filtering the sources
Filtering the content of the src/main/application
directory or the one defined by the earSourceDirectory
parameter is as easy as:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<filtering>true</filtering>
[...]
</configuration>
</plugin>
</plugins>
</build>
Note that the standard properties are available for filtering. It is also possible to specify a set of property files to add extra values if necessary. The configuration below uses also the properties defined in src/main/filters/config.properties
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<filtering>true</filtering>
<filters>
<filter>src/main/filters/config.properties</filter>
</filters>
[...]
</configuration>
</plugin>
</plugins>
</build>