过滤源
过滤src/main/application
目录的内容或参数定义的内容earSourceDirectory
很简单:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>3.2.0</version> <configuration> <filtering>true</filtering> [...] </configuration> </plugin> </plugins> </build>
请注意,标准属性可用于过滤。如果需要,还可以指定一组属性文件来添加额外的值。下面的配置也使用了定义的属性src/main/filters/config.properties
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>3.2.0</version> <configuration> <filtering>true</filtering> <filters> <filter>src/main/filters/config.properties</filter> </filters> [...] </configuration> </plugin> </plugins> </build>