code_junkie

How to get Maven to run war:exploded but not war:war

Nov 12th, 2011
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. <plugin>
  2. <groupId>org.apache.maven.plugins</groupId>
  3. <artifactId>maven-war-plugin</artifactId>
  4. <executions>
  5. <execution>
  6. <phase>package</phase>
  7. <configuration>
  8. <webappDirectory>target/${env}/deploy</webappDirectory>
  9. <archiveClasses>true</archiveClasses>
  10. </configuration>
  11. <goals>
  12. <goal>
  13. exploded
  14. </goal>
  15. </goals>
  16. </execution>
  17. </executions>
  18. </plugin>
  19.  
  20. mvn prepare-package war:exploded
  21.  
  22. <build>
  23. <plugins>
  24. <plugin>
  25. <artifactId>maven-resources-plugin</artifactId>
  26. <executions>
  27. <execution>
  28. <id>process-resources</id>
  29. <phase>process-resources</phase>
  30. <goals>
  31. <goal>resources</goal
  32. </goal>
  33. </execution>
  34. </executions>
  35. </plugin>
  36. <plugin>
  37. <artifactId>maven-compile-plugin</artifactId>
  38. <executions>
  39. <execution>
  40. <id>compile</id>
  41. <phase>compile</phase>
  42. <goals>
  43. <goal>compile</goal
  44. </goal>
  45. </execution>
  46. </executions>
  47. </plugin>
  48. <plugin>
  49. <artifactId>maven-resources-plugin</artifactId>
  50. <executions>
  51. <execution>
  52. <id>process-test-resources</id>
  53. <phase>process-test-resources</phase>
  54. <goals>
  55. <goal>testResources</goal
  56. </goal>
  57. </execution>
  58. </executions>
  59. </plugin>
  60. <plugin>
  61. <artifactId>maven-surefire-plugin</artifactId>
  62. <executions>
  63. <execution>
  64. <id>test</id>
  65. <phase>test</phase>
  66. <goals>
  67. <goal>test</goal
  68. </goal>
  69. </execution>
  70. </executions>
  71. </plugin>
  72. <!-- package not wanted, install and deploy already defined for pom packaging-->
  73. <!--define war:war execution in a profile in case it is needed-->
Add Comment
Please, Sign In to add comment