All jars will have a Environment entry in manifest file as shown below. Environment: test02
Environment specific maven archive configuration is enabled as shown below. For the environments that don’t have an archive configuration specified, default configuration will be used just as it is done for any jar built using maven.
Environment specific archive configuration can be specified inside <«environmentArchiveConfiguration»> tag. Multiple <«environmentArchiveConfiguration»> tags can be grouped inside an <«archives»> tag.
<«environmentArchiveConfiguration»> tag takes a <«environment»> tag and an <«archive»> tag.
Environment tag takes a string representing the name of the environment.
The default manifest can be altered with the <«archive»> configuration element. archive is a standard maven tag. Below you will find some of the configuration options that are available. For more info see the {{{http://maven.apache.org/shared/maven-archiver/index.html}Maven Archiver reference}}.
<project> ... <build> <plugins> <plugin> <groupId>net.sf.environments-maven-plugin</groupId> <artifactId>environments-maven-plugin</artifactId> <version>1.1.0-SNAPSHOT</version> <configuration> <excludeEnvironments>dev01, qa01</excludeEnvironments> <parallel>true</parallel> <archives> <environmentArchiveConfiguration> <environment>dev02</environment> <archive> <manifestEntries> <mode>development</mode> <key>value</key> </manifestEntries> </archive> </environmentArchiveConfiguration> <environmentArchiveConfiguration> <environment>prod01, prod02</environment> <archive> <manifestEntries> <mode>development1</mode> <key>value1</key> </manifestEntries> </archive> </environmentArchiveConfiguration> </archives> </configuration> <executions> <execution> <goals> <goal>configuration</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ... </project>