Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. <plugin>
  2. <artifactId>maven-assembly-plugin</artifactId>
  3. <configuration>
  4. <descriptorRefs>
  5. <descriptorRef>jar-with-dependencies</descriptorRef>
  6. </descriptorRefs>
  7. <archive>
  8. <manifest>
  9. <mainClass>com.company.Main</mainClass>
  10. </manifest>
  11. </archive>
  12. </configuration>
  13. <executions>
  14. <execution>
  15. <phase>package</phase>
  16. <goals>
  17. <goal>single</goal>
  18. </goals>
  19. </execution>
  20. </executions>
  21. </plugin>
  22.  
  23. <dependency>
  24. <groupId>groupid</groupId>
  25. <artifactId>local</artifactId>
  26. <version>1.1</version>
  27. <scope>system</scope>
  28. <systemPath>${basedir}/lib/local-utilities-1.1.jar</systemPath>
  29. </dependency>
  30.  
  31. <build>
  32. <pluginManagement>
  33. <plugins>
  34. <!-- Ignore/Execute plugin execution -->
  35. <plugin>
  36. <groupId>org.eclipse.m2e</groupId>
  37. <artifactId>lifecycle-mapping</artifactId>
  38. <version>1.0.0</version>
  39. <configuration>
  40. <lifecycleMappingMetadata>
  41. <pluginExecutions>
  42. <!-- copy-dependency plugin -->
  43. <pluginExecution>
  44. <pluginExecutionFilter>
  45. <groupId>org.apache.maven.plugins</groupId>
  46. <artifactId>maven-dependency-plugin</artifactId>
  47. <versionRange>[1.0.0,)</versionRange>
  48. <goals>
  49. <goal>copy-dependencies</goal>
  50. </goals>
  51. </pluginExecutionFilter>
  52. <action>
  53. <ignore />
  54. </action>
  55. </pluginExecution>
  56. </pluginExecutions>
  57. </lifecycleMappingMetadata>
  58. </configuration>
  59. </plugin>
  60. </plugins>
  61. </pluginManagement>
  62.  
  63. <plugins>
  64. <plugin>
  65. <groupId>org.apache.maven.plugins</groupId>
  66. <artifactId>maven-dependency-plugin</artifactId>
  67. <version>2.4</version>
  68. <executions>
  69. <execution>
  70. <phase>package</phase>
  71. <goals>
  72. <goal>copy-dependencies</goal>
  73. </goals>
  74. </execution>
  75.  
  76. </executions>
  77. <configuration>
  78. <outputDirectory>${project.build.directory}</outputDirectory>
  79. </configuration>
  80. </plugin>
  81.  
  82. <plugin>
  83. <!-- creates one single JAR, run: mvn assembly:single | mvn install -->
  84. <artifactId>maven-assembly-plugin</artifactId>
  85. <executions>
  86. <execution>
  87. <phase>package</phase>
  88. <goals>
  89. <goal>single</goal>
  90. </goals>
  91. </execution>
  92. </executions>
  93. <configuration>
  94. <archive>
  95. <manifest>
  96. <mainClass>${mainClass}</mainClass>
  97. </manifest>
  98. </archive>
  99. <descriptorRefs>
  100. <descriptorRef>jar-with-dependencies</descriptorRef>
  101. </descriptorRefs>
  102. </configuration>
  103. </plugin>
  104.  
  105. </plugins>
  106.  
  107. </build>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement