I\'m having a problem with this very redundant maven configuration.
The application I\'m working on sometimes gets built for environments that need alternate resourc
Assuming the following structure:
src/
└── main
├── assembly
│ └── iterator.xml
└── environment
├── dev
│ └── server.properties
├── pretest
│ └── server.properties
├── production
│ └── server.properties
├── qa
│ └── server.properties
└── test
└── server.properties
where you can use the following assembly-descriptor like this:
${item}
war
false
true
false
WEB-INF
${basedir}/src/main/environment/${item}/
**
WEB-INF
${project.build.directory}/environment/${item}
**
using the iterator-maven-plugin will solve the problem:
com.soebes.maven.plugins
iterator-maven-plugin
0.2
package
executor
- dev
- test
- qa
- production
- pretest
single
org.apache.maven.plugins
maven-assembly-plugin
${project.basedir}/src/main/assembly/iterator.xml
The iterator-maven-plugin is available via maven central. I think you can adapt the above configuration/structure to your problem.