1
- <project xmlns =" http://maven.apache.org/POM/4.0.0"
2
- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0
1
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
2
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0
4
3
http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
- <modelVersion >4.0.0</modelVersion >
6
- <groupId >com.cloudcontrolled.sample.mysql</groupId >
7
- <artifactId >java-mysql-example-app</artifactId >
8
- <version >1.0-SNAPSHOT</version >
9
- <packaging >jar</packaging >
4
+ <modelVersion >4.0.0</modelVersion >
5
+ <groupId >com.cloudcontrolled.sample.mysql</groupId >
6
+ <artifactId >java-mysql-example-app</artifactId >
7
+ <version >1.0-SNAPSHOT</version >
8
+ <packaging >jar</packaging >
10
9
<dependencies >
11
10
<dependency >
12
11
<groupId >mysql</groupId >
@@ -40,9 +39,11 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
40
39
<execution >
41
40
<id >copy-dependencies</id >
42
41
<phase >package</phase >
43
- <goals ><goal >copy-dependencies</goal ></goals >
42
+ <goals >
43
+ <goal >copy-dependencies</goal >
44
+ </goals >
44
45
<configuration >
45
- <outputDirectory >${project.build.directory} /lib</outputDirectory >
46
+ <outputDirectory >${project.build.directory} /lib</outputDirectory >
46
47
</configuration >
47
48
</execution >
48
49
</executions >
@@ -55,22 +56,30 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
56
<source >1.8</source >
56
57
<target >1.8</target >
57
58
</configuration >
58
- </plugin >
59
+ </plugin >
59
60
<plugin >
60
- <!-- Build an executable JAR -->
61
- <groupId >org.apache.maven.plugins</groupId >
62
- <artifactId >maven-jar-plugin</artifactId >
63
- <version >3.1.0</version >
64
- <configuration >
65
- <archive >
66
- <manifest >
67
- <addClasspath >true</addClasspath >
68
- <classpathPrefix >lib/</classpathPrefix >
69
- <mainClass >com.cloudcontrolled.sample.mysql.App</mainClass >
70
- </manifest >
71
- </archive >
72
- </configuration >
73
- </plugin >
61
+ <artifactId >maven-assembly-plugin</artifactId >
62
+ <executions >
63
+ <execution >
64
+ <phase >package</phase >
65
+ <goals >
66
+ <goal >single</goal >
67
+ </goals >
68
+ </execution >
69
+ </executions >
70
+ <configuration >
71
+ <archive >
72
+ <manifest >
73
+ <addClasspath >true</addClasspath >
74
+ <classpathPrefix >lib/</classpathPrefix >
75
+ <mainClass >com.cloudcontrolled.sample.mysql.App</mainClass >
76
+ </manifest >
77
+ </archive >
78
+ <descriptorRefs >
79
+ <descriptorRef >jar-with-dependencies</descriptorRef >
80
+ </descriptorRefs >
81
+ </configuration >
82
+ </plugin >
74
83
</plugins >
75
84
</build >
76
85
</project >
0 commit comments