I'm not sure if this is exactly what you are asking for, but you can do the following to set up several filters for your Maven project.
<filters> <filter>/your/path/filter-${env}.properties</filter> </filters>
This way you can configure multiple profiles using:
<profiles> <profile> <id>local</id> <properties> <env>local</env> </properties> </profile> <profile> <id>test</id> <properties> <env>test</env> </properties> </profile> </profiles>
Then you can start the assembly with the appropriate properties file using:
mvn -P <profile id>
This will require the presence of property files located at:
/your/path/filter-local.properties /your/path/filter-test.properties
Taylor leese
source share