Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Include Maven profile name in assembly-plugin built (with dependencies) jar
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2.2</version>
- <executions>
- <execution>
- <id>jar-with-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <finalName>ws-client</finalName>
- <appendAssemblyId>false</appendAssemblyId>
- <archive>
- <manifest>
- <mainClass>Example</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <finalName>${project.artifactId}-${lane}</finalName>
- <profiles>
- <profile>
- <id>DEV</id>
- <properties>
- <lane>DEV</lane>
- </properties>
- <profile>
- </profiles>
- <finalName>${project.artifactId}-${lane}</finalName>
- mvn -Dlane=DEV|STAGE|PROD
- <profile>
- <id>DEV</id>
- <activation>
- <property>
- <name>lane</name>
- <value>DEV</value>
- </property>
- </activation>
- <build>
- // rest of the profile
- </profile>
Add Comment
Please, Sign In to add comment