Guest User

Untitled

a guest
Sep 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. Include Maven profile name in assembly-plugin built (with dependencies) jar
  2. <plugin>
  3. <artifactId>maven-assembly-plugin</artifactId>
  4. <version>2.2.2</version>
  5. <executions>
  6. <execution>
  7. <id>jar-with-dependencies</id>
  8. <phase>package</phase>
  9. <goals>
  10. <goal>single</goal>
  11. </goals>
  12. </execution>
  13. </executions>
  14. <configuration>
  15. <descriptorRefs>
  16. <descriptorRef>jar-with-dependencies</descriptorRef>
  17. </descriptorRefs>
  18. <finalName>ws-client</finalName>
  19. <appendAssemblyId>false</appendAssemblyId>
  20. <archive>
  21. <manifest>
  22. <mainClass>Example</mainClass>
  23. </manifest>
  24. </archive>
  25. </configuration>
  26. </plugin>
  27.  
  28. <finalName>${project.artifactId}-${lane}</finalName>
  29.  
  30. <profiles>
  31. <profile>
  32. <id>DEV</id>
  33. <properties>
  34. <lane>DEV</lane>
  35. </properties>
  36. <profile>
  37. </profiles>
  38.  
  39. <finalName>${project.artifactId}-${lane}</finalName>
  40.  
  41. mvn -Dlane=DEV|STAGE|PROD
  42.  
  43. <profile>
  44. <id>DEV</id>
  45. <activation>
  46. <property>
  47. <name>lane</name>
  48. <value>DEV</value>
  49. </property>
  50. </activation>
  51. <build>
  52. // rest of the profile
  53. </profile>
Add Comment
Please, Sign In to add comment