Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. <build>
  2. <!-- Goals may be set in the IDE or the pom IDE or CLI goals override the
  3. defaultGoal -->
  4. <defaultGoal>clean compile package exec:java</defaultGoal>
  5.  
  6. <!-- Plugins define components that perform actions -->
  7. <plugins>
  8.  
  9. <!-- Compiler: Select the version of the Java compiler and any command
  10. line switches to use with it -->
  11. <plugin>
  12. <groupId>org.apache.maven.plugins</groupId>
  13. <artifactId>maven-compiler-plugin</artifactId>
  14. <version>3.5.1</version>
  15.  
  16. <configuration>
  17. <!-- Java version of the source files -->
  18. <source>1.8</source>
  19.  
  20. <!-- Java version of the class files -->
  21. <target>1.8</target>
  22.  
  23. <!-- sometimes the IDE does not reveal all the important warnings -->
  24. <compilerArgument>-Xlint:all</compilerArgument>
  25. <showWarnings>true</showWarnings>
  26. <showDeprecation>true</showDeprecation>
  27. </configuration>
  28. </plugin>
  29.  
  30. <!-- Shade: Create an executable jar containing all the dependencies when
  31. the package goal is carried out -->
  32. <plugin>
  33. <groupId>org.apache.maven.plugins</groupId>
  34. <artifactId>maven-shade-plugin</artifactId>
  35. <version>2.4.3</version>
  36. <configuration>
  37. <transformers>
  38. <transformer
  39. implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  40. <mainClass>${mainClass}</mainClass>
  41. </transformer>
  42. </transformers>
  43. </configuration>
  44.  
  45. <executions>
  46. <execution>
  47. <phase>package</phase>
  48. <goals>
  49. <goal>shade</goal>
  50. </goals>
  51. </execution>
  52. </executions>
  53. </plugin>
  54.  
  55. <!-- Exec: Executes the program -->
  56. <plugin>
  57. <groupId>org.codehaus.mojo</groupId>
  58. <artifactId>exec-maven-plugin</artifactId>
  59. <version>1.5.0</version>
  60. <executions>
  61. <execution>
  62. <id>default-cli</id>
  63. <goals>
  64. <!-- Runs in separate instance of JVM -->
  65. <goal>exec</goal>
  66. <!-- Runs in same instance of JVM as Eclipse -->
  67. <goal>java</goal>
  68. </goals>
  69. <configuration>
  70. <!--used by java goal -->
  71. <!--executes in the same VM that Maven runs in -->
  72. <mainClass>${mainClass}</mainClass>
  73.  
  74. <!--used by exec goal -->
  75. <!--runs in a separate VM from the one that Maven runs in -->
  76. <executable>${java.home}/bin/java</executable>
  77. <commandlineArgs>-jar ${project.build.directory}/${project.build.finalName}.jar</commandlineArgs>
  78. </configuration>
  79. </execution>
  80. </executions>
  81. </plugin>
  82.  
  83. <!-- Surefire: During the test phase of the build life cycle executes
  84. JUnit tests and write the results to an xml and txt file -->
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-surefire-plugin</artifactId>
  88. <version>2.19.1</version>
  89. <!-- Turn on tests: false, Turn off tests: true -->
  90. <configuration>
  91. <skipTests>false</skipTests>
  92. </configuration>
  93. </plugin>
  94.  
  95. </plugins>
  96. </build>
  97. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement