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
43http://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 >
109 <dependencies >
1110 <dependency >
1211 <groupId >mysql</groupId >
@@ -16,7 +15,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
1615 <dependency >
1716 <groupId >org.eclipse.jetty</groupId >
1817 <artifactId >jetty-servlet</artifactId >
19- <version >7.6.0.v20120127 </version >
18+ <version >9.3.8.v20160314 </version >
2019 </dependency >
2120 <dependency >
2221 <groupId >javax.servlet</groupId >
@@ -40,7 +39,12 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
4039 <execution >
4140 <id >copy-dependencies</id >
4241 <phase >package</phase >
43- <goals ><goal >copy-dependencies</goal ></goals >
42+ <goals >
43+ <goal >copy-dependencies</goal >
44+ </goals >
45+ <configuration >
46+ <outputDirectory >${project.build.directory} /lib</outputDirectory >
47+ </configuration >
4448 </execution >
4549 </executions >
4650 </plugin >
@@ -49,10 +53,33 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
4953 <artifactId >maven-compiler-plugin</artifactId >
5054 <version >2.3.2</version >
5155 <configuration >
52- <source >1.6 </source >
53- <target >1.6 </target >
56+ <source >1.8 </source >
57+ <target >1.8 </target >
5458 </configuration >
55- </plugin >
59+ </plugin >
60+ <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 >
5683 </plugins >
5784 </build >
5885</project >
0 commit comments