Przeglądaj źródła

打包修改打jar报方式(备注zip报 读取配置sql的xml有bug )

wanyao 4 lat temu
rodzic
commit
5ed68bc49b
3 zmienionych plików z 560 dodań i 104 usunięć
  1. 14 104
      ebc-sea-platform/pom.xml
  2. 228 0
      ebc-sea-platform/pom_full.xml
  3. 318 0
      ebc-sea-platform/pom_part.xml

+ 14 - 104
ebc-sea-platform/pom.xml

@ -194,123 +194,33 @@
194 194
					<encoding>${encoding}</encoding>
195 195
					<!-- 通过此方法添加本地jar -->
196 196
					<compilerArguments>
197
						<!--suppress UnresolvedMavenProperty -->
198
						<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
199
						<extdirs>${project.basedir}/libs</extdirs>
197
	 					<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
198
	 					<extdirs>${project.basedir}/libs</extdirs>
200 199
					</compilerArguments>
201 200
				</configuration>
202 201
			</plugin>
203 202
			<plugin>
204
				<groupId>org.apache.maven.plugins</groupId>
205
				<artifactId>maven-surefire-plugin</artifactId>
206
				<configuration>
207
					<skip>true</skip>
208
				</configuration>
209
			</plugin>
210
			<!-- ==========应用包和依赖包分离的打包方法================ -->
203
                <groupId>org.apache.maven.plugins</groupId>
204
                <artifactId>maven-surefire-plugin</artifactId>
205
                <configuration>
206
                    <skip>true</skip>
207
                </configuration>
208
            </plugin>
209
			<!-- 比spring-boot-dependencies中多了build-info -->
211 210
			<plugin>
212
				<groupId>org.apache.maven.plugins</groupId>
213
				<artifactId>maven-resources-plugin</artifactId>
214
				<executions>
215
					<execution>
216
						<id>copy-resources</id>
217
						<phase>compile</phase>
218
						<goals>
219
							<goal>copy-resources</goal>
220
						</goals>
221
						<configuration>
222
							<encoding>${encoding}</encoding>
223
							<resources>
224
								<resource>
225
									<directory>${project.build.directory}/classes</directory>
226
									<includes>
227
										<include>**/*.properties</include>
228
										<include>**/*.xml</include>
229
										<include>**/*.yaml</include>
230
										<include>**/*.yml</include>
231
										<include>**/*.txt</include>
232
									</includes>
233
								</resource>
234
							</resources>
235
							<!-- 表示把配置文件拷到和jar包同一个路径下 -->
236
							<outputDirectory>
237
								${project.build.directory}/config
238
							</outputDirectory>
239
						</configuration>
240
					</execution>
241
				</executions>
242
			</plugin>
243
			<!-- 复制依赖包 -->
244
			<plugin>
245
				<groupId>org.apache.maven.plugins</groupId>
246
				<artifactId>maven-dependency-plugin</artifactId>
211
				<groupId>org.springframework.boot</groupId>
212
				<artifactId>spring-boot-maven-plugin</artifactId>
247 213
				<executions>
248 214
					<execution>
249
						<id>copy-dependencies</id>
250
						<phase>package</phase>
251 215
						<goals>
252
							<goal>copy-dependencies</goal>
216
							<goal>repackage</goal>
217
							<goal>build-info</goal>
253 218
						</goals>
254
						<configuration>
255
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
256
						</configuration>
257 219
					</execution>
258 220
				</executions>
259
			</plugin>
260
			<plugin>
261
				<groupId>org.apache.maven.plugins</groupId>
262
				<artifactId>maven-jar-plugin</artifactId>
263
				<configuration>
264
					<archive>
265
						<!--生成的jar中,不要包含pom.xml和pom.properties这两个文件-->
266
						<addMavenDescriptor>false</addMavenDescriptor>
267
						<manifest>
268
							<!--是否要把第三方jar放到manifest的classpath中-->
269
							<addClasspath>true</addClasspath>
270
							<!--生成的manifest中classpath的前缀,lib存放第三方jar-->
271
							<classpathPrefix>lib/</classpathPrefix>
272
							<!--应用的main class-->
273
							<mainClass>${start-class}</mainClass>
274
							<!-- 去掉jar后的时间戳 -->
275
							<useUniqueVersions>false</useUniqueVersions>
276
						</manifest>
277
						<!-- 自定义的MANIFEST.MF参数 -->
278
						<manifestEntries>
279
							<!-- 增加classpath目录config -->
280
							<Class-Path>./config/</Class-Path>
281
						</manifestEntries>
282
					</archive>
283
					<!--过滤掉不希望包含在jar中的文件-->
284
					<excludes>
285
						<exclude>**/*.properties</exclude>
286
						<exclude>**/*.xml</exclude>
287
						<exclude>**/*.yaml</exclude>
288
						<exclude>**/*.yml</exclude>
289
						<exclude>**/*.txt</exclude>
290
					</excludes>
291
				</configuration>
292
			</plugin>
293

294
			<plugin>
295
				<groupId>org.apache.maven.plugins</groupId>
296
				<artifactId>maven-assembly-plugin</artifactId>
297
				<version>2.4</version>
298
				<!-- The configuration of the plugin -->
299 221
				<configuration>
300
					<!-- Specifies the configuration file of the assembly plugin -->
301
					<descriptors>
302
						<descriptor>src/main/assembly-package.xml</descriptor>
303
					</descriptors>
222
					<mainClass>${start-class}</mainClass>
304 223
				</configuration>
305
				<executions>
306
					<execution>
307
						<id>make-assembly</id>
308
						<phase>package</phase>
309
						<goals>
310
							<goal>single</goal>
311
						</goals>
312
					</execution>
313
				</executions>
314 224
			</plugin>
315 225
		</plugins>
316 226
		<finalName>${project.artifactId}</finalName>

+ 228 - 0
ebc-sea-platform/pom_full.xml

@ -0,0 +1,228 @@
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
	<modelVersion>4.0.0</modelVersion>
4

5
	<parent>
6
		<groupId>com.ai.ipu.server</groupId>
7
		<artifactId>ipu-rest-libs</artifactId>
8
		<version>3.1-SNAPSHOT</version>
9
	</parent>
10

11
	<artifactId>ebc-sea-platform</artifactId>
12
	<packaging>jar</packaging>
13

14
	<properties>
15
		<start-class>com.ai.ipu.server.EbcSeaPlatformStart</start-class>
16
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17
		<mongo.java.driver>3.11.2</mongo.java.driver>
18
		<ipu>3.1-SNAPSHOT</ipu>
19
		<jdk>1.8</jdk>
20
		<junit>4.12</junit>
21
		<spring-session.version>1.3.2.RELEASE</spring-session.version>
22
		<nacos.version>0.1.1</nacos.version>
23
		<poi.version>3.14</poi.version>
24
		<swagger.version>2.6.1</swagger.version>
25
	</properties>
26

27
	<repositories>
28
		<!-- 阿里私服 -->
29
		<repository>
30
			<id>ali</id>
31
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
32
			<releases>
33
				<enabled>true</enabled>
34
			</releases>
35
			<snapshots>
36
				<enabled>true</enabled>
37
				<updatePolicy>always</updatePolicy>
38
				<checksumPolicy>fail</checksumPolicy>
39
			</snapshots>
40
		</repository>
41
		<!-- IPU仓库 -->
42
		<repository>
43
			<id>ipu</id>
44
			<name>ipu repository</name>
45
			<url>http://114.215.100.48/nexus/content/groups/public/</url>
46
			<releases>
47
				<enabled>true</enabled>
48
			</releases>
49
			<snapshots>
50
				<enabled>true</enabled>
51
				<updatePolicy>always</updatePolicy>
52
			</snapshots>
53
		</repository>
54
	</repositories>
55

56
	<dependencies>
57
		<dependency>
58
			<groupId>com.ai.ipu</groupId>
59
			<artifactId>ipu-sql-mgmt</artifactId>
60
			<version>${ipu}</version>
61
			<!-- 屏蔽以后Idea可能启动报错 -->
62
<!--			<scope>provided</scope>-->
63
		</dependency>
64
		<dependency>
65
			<groupId>com.ai.ipu.server</groupId>
66
			<artifactId>ipu-restful</artifactId>
67
		</dependency>
68
		<!--uspa start-->
69
		<dependency>
70
			<groupId>org.springframework</groupId>
71
			<artifactId>spring-orm</artifactId>
72
			<version>4.1.9.RELEASE</version>
73
		</dependency>
74
		<!-- apache start -->
75
		<dependency>
76
			<groupId>commons-configuration</groupId>
77
			<artifactId>commons-configuration</artifactId>
78
			<version>1.10</version>
79
		</dependency>
80
		<dependency>
81
			<groupId>commons-fileupload</groupId>
82
			<artifactId>commons-fileupload</artifactId>
83
			<version>1.3.2</version>
84
		</dependency>
85
		<dependency>
86
			<groupId>oro</groupId>
87
			<artifactId>oro</artifactId>
88
			<version>2.0.8</version>
89
		</dependency>
90
		<dependency>
91
			<groupId>commons-net</groupId>
92
			<artifactId>commons-net</artifactId>
93
			<version>3.6</version>
94
		</dependency>
95
		<!-- apache end -->
96
		<dependency>
97
			<groupId>org.hibernate</groupId>
98
			<artifactId>hibernate-core</artifactId>
99
			<version>4.2.5.Final</version>
100
		</dependency>
101
		<!-- swagger start -->
102
		<dependency>
103
			<groupId>io.springfox</groupId>
104
			<artifactId>springfox-swagger2</artifactId>
105
			<version>${swagger.version}</version>
106
		</dependency>
107
		<dependency>
108
			<groupId>io.springfox</groupId>
109
			<artifactId>springfox-swagger-ui</artifactId>
110
			<version>${swagger.version}</version>
111
		</dependency>
112
		<!-- swagger end -->
113
		<dependency>
114
			<groupId>com.thoughtworks.xstream</groupId>
115
			<artifactId>xstream</artifactId>
116
			<version>1.4.10</version>
117
		</dependency>
118
		<!--	poi start  -->
119
		<dependency>
120
			<groupId>org.apache.poi</groupId>
121
			<artifactId>poi-ooxml</artifactId>
122
			<version>${poi.version}</version>
123
		</dependency>
124
		<dependency>
125
			<groupId>org.apache.poi</groupId>
126
			<artifactId>poi-ooxml-schemas</artifactId>
127
			<version>${poi.version}</version>
128
		</dependency>
129
		<dependency>
130
			<groupId>org.apache.poi</groupId>
131
			<artifactId>poi-scratchpad</artifactId>
132
			<version>${poi.version}</version>
133
		</dependency>
134
		<dependency>
135
			<groupId>org.apache.poi</groupId>
136
			<artifactId>poi-excelant</artifactId>
137
			<version>${poi.version}</version>
138
		</dependency>
139
		<dependency>
140
			<groupId>org.apache.poi</groupId>
141
			<artifactId>poi-contrib</artifactId>
142
			<version>3.6</version>
143
		</dependency>
144
		<dependency>
145
			<groupId>commons-digester</groupId>
146
			<artifactId>commons-digester</artifactId>
147
			<version>2.1</version>
148
		</dependency>
149
		<!-- poi end -->
150
		<dependency>
151
			<groupId>commons-httpclient</groupId>
152
			<artifactId>commons-httpclient</artifactId>
153
			<version>3.1</version>
154
		</dependency>
155
		<dependency>
156
			<groupId>org.projectlombok</groupId>
157
			<artifactId>lombok</artifactId>
158
			<version>1.16.10</version>
159
			<scope>provided</scope>
160
		</dependency>
161
		<!--  IPU 镜屏 -->
162
		<dependency>
163
			<groupId>com.ai.ipu.server</groupId>
164
			<artifactId>iot-stomp-server</artifactId>
165
			<version>${ipu}</version>
166
			<exclusions>
167
				<exclusion>
168
					<groupId>org.apache.logging.log4j</groupId>
169
					<artifactId>log4j-slf4j-impl</artifactId>
170
				</exclusion>
171
			</exclusions>
172
		</dependency>
173
	</dependencies>
174

175
	<!--<build>
176
		<plugins>
177
			<plugin>
178
				<groupId>org.springframework.boot</groupId>
179
				<artifactId>spring-boot-maven-plugin</artifactId>
180
				<configuration>
181
					<fork>true</fork>
182
				</configuration>
183
			</plugin>
184
		</plugins>
185
	</build>-->
186

187
	<build>
188
		<plugins>
189
			<plugin>
190
				<artifactId>maven-compiler-plugin</artifactId>
191
				<configuration>
192
					<source>${compiler-version}</source>
193
					<target>${compiler-version}</target>
194
					<encoding>${encoding}</encoding>
195
					<!-- 通过此方法添加本地jar -->
196
					<compilerArguments>
197
	 					<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
198
	 					<extdirs>${project.basedir}/libs</extdirs>
199
					</compilerArguments>
200
				</configuration>
201
			</plugin>
202
			<plugin>
203
                <groupId>org.apache.maven.plugins</groupId>
204
                <artifactId>maven-surefire-plugin</artifactId>
205
                <configuration>
206
                    <skip>true</skip>
207
                </configuration>
208
            </plugin>
209
			<!-- 比spring-boot-dependencies中多了build-info -->
210
			<plugin>
211
				<groupId>org.springframework.boot</groupId>
212
				<artifactId>spring-boot-maven-plugin</artifactId>
213
				<executions>
214
					<execution>
215
						<goals>
216
							<goal>repackage</goal>
217
							<goal>build-info</goal>
218
						</goals>
219
					</execution>
220
				</executions>
221
				<configuration>
222
					<mainClass>${start-class}</mainClass>
223
				</configuration>
224
			</plugin>
225
		</plugins>
226
		<finalName>${project.artifactId}</finalName>
227
	</build>
228
</project>

+ 318 - 0
ebc-sea-platform/pom_part.xml

@ -0,0 +1,318 @@
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
	<modelVersion>4.0.0</modelVersion>
4

5
	<parent>
6
		<groupId>com.ai.ipu.server</groupId>
7
		<artifactId>ipu-rest-libs</artifactId>
8
		<version>3.1-SNAPSHOT</version>
9
	</parent>
10

11
	<artifactId>ebc-sea-platform</artifactId>
12
	<packaging>jar</packaging>
13

14
	<properties>
15
		<start-class>com.ai.ipu.server.EbcSeaPlatformStart</start-class>
16
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17
		<mongo.java.driver>3.11.2</mongo.java.driver>
18
		<ipu>3.1-SNAPSHOT</ipu>
19
		<jdk>1.8</jdk>
20
		<junit>4.12</junit>
21
		<spring-session.version>1.3.2.RELEASE</spring-session.version>
22
		<nacos.version>0.1.1</nacos.version>
23
		<poi.version>3.14</poi.version>
24
		<swagger.version>2.6.1</swagger.version>
25
	</properties>
26

27
	<repositories>
28
		<!-- 阿里私服 -->
29
		<repository>
30
			<id>ali</id>
31
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
32
			<releases>
33
				<enabled>true</enabled>
34
			</releases>
35
			<snapshots>
36
				<enabled>true</enabled>
37
				<updatePolicy>always</updatePolicy>
38
				<checksumPolicy>fail</checksumPolicy>
39
			</snapshots>
40
		</repository>
41
		<!-- IPU仓库 -->
42
		<repository>
43
			<id>ipu</id>
44
			<name>ipu repository</name>
45
			<url>http://114.215.100.48/nexus/content/groups/public/</url>
46
			<releases>
47
				<enabled>true</enabled>
48
			</releases>
49
			<snapshots>
50
				<enabled>true</enabled>
51
				<updatePolicy>always</updatePolicy>
52
			</snapshots>
53
		</repository>
54
	</repositories>
55

56
	<dependencies>
57
		<dependency>
58
			<groupId>com.ai.ipu</groupId>
59
			<artifactId>ipu-sql-mgmt</artifactId>
60
			<version>${ipu}</version>
61
			<!-- 屏蔽以后Idea可能启动报错 -->
62
<!--			<scope>provided</scope>-->
63
		</dependency>
64
		<dependency>
65
			<groupId>com.ai.ipu.server</groupId>
66
			<artifactId>ipu-restful</artifactId>
67
		</dependency>
68
		<!--uspa start-->
69
		<dependency>
70
			<groupId>org.springframework</groupId>
71
			<artifactId>spring-orm</artifactId>
72
			<version>4.1.9.RELEASE</version>
73
		</dependency>
74
		<!-- apache start -->
75
		<dependency>
76
			<groupId>commons-configuration</groupId>
77
			<artifactId>commons-configuration</artifactId>
78
			<version>1.10</version>
79
		</dependency>
80
		<dependency>
81
			<groupId>commons-fileupload</groupId>
82
			<artifactId>commons-fileupload</artifactId>
83
			<version>1.3.2</version>
84
		</dependency>
85
		<dependency>
86
			<groupId>oro</groupId>
87
			<artifactId>oro</artifactId>
88
			<version>2.0.8</version>
89
		</dependency>
90
		<dependency>
91
			<groupId>commons-net</groupId>
92
			<artifactId>commons-net</artifactId>
93
			<version>3.6</version>
94
		</dependency>
95
		<!-- apache end -->
96
		<dependency>
97
			<groupId>org.hibernate</groupId>
98
			<artifactId>hibernate-core</artifactId>
99
			<version>4.2.5.Final</version>
100
		</dependency>
101
		<!-- swagger start -->
102
		<dependency>
103
			<groupId>io.springfox</groupId>
104
			<artifactId>springfox-swagger2</artifactId>
105
			<version>${swagger.version}</version>
106
		</dependency>
107
		<dependency>
108
			<groupId>io.springfox</groupId>
109
			<artifactId>springfox-swagger-ui</artifactId>
110
			<version>${swagger.version}</version>
111
		</dependency>
112
		<!-- swagger end -->
113
		<dependency>
114
			<groupId>com.thoughtworks.xstream</groupId>
115
			<artifactId>xstream</artifactId>
116
			<version>1.4.10</version>
117
		</dependency>
118
		<!--	poi start  -->
119
		<dependency>
120
			<groupId>org.apache.poi</groupId>
121
			<artifactId>poi-ooxml</artifactId>
122
			<version>${poi.version}</version>
123
		</dependency>
124
		<dependency>
125
			<groupId>org.apache.poi</groupId>
126
			<artifactId>poi-ooxml-schemas</artifactId>
127
			<version>${poi.version}</version>
128
		</dependency>
129
		<dependency>
130
			<groupId>org.apache.poi</groupId>
131
			<artifactId>poi-scratchpad</artifactId>
132
			<version>${poi.version}</version>
133
		</dependency>
134
		<dependency>
135
			<groupId>org.apache.poi</groupId>
136
			<artifactId>poi-excelant</artifactId>
137
			<version>${poi.version}</version>
138
		</dependency>
139
		<dependency>
140
			<groupId>org.apache.poi</groupId>
141
			<artifactId>poi-contrib</artifactId>
142
			<version>3.6</version>
143
		</dependency>
144
		<dependency>
145
			<groupId>commons-digester</groupId>
146
			<artifactId>commons-digester</artifactId>
147
			<version>2.1</version>
148
		</dependency>
149
		<!-- poi end -->
150
		<dependency>
151
			<groupId>commons-httpclient</groupId>
152
			<artifactId>commons-httpclient</artifactId>
153
			<version>3.1</version>
154
		</dependency>
155
		<dependency>
156
			<groupId>org.projectlombok</groupId>
157
			<artifactId>lombok</artifactId>
158
			<version>1.16.10</version>
159
			<scope>provided</scope>
160
		</dependency>
161
		<!--  IPU 镜屏 -->
162
		<dependency>
163
			<groupId>com.ai.ipu.server</groupId>
164
			<artifactId>iot-stomp-server</artifactId>
165
			<version>${ipu}</version>
166
			<exclusions>
167
				<exclusion>
168
					<groupId>org.apache.logging.log4j</groupId>
169
					<artifactId>log4j-slf4j-impl</artifactId>
170
				</exclusion>
171
			</exclusions>
172
		</dependency>
173
	</dependencies>
174

175
	<!--<build>
176
		<plugins>
177
			<plugin>
178
				<groupId>org.springframework.boot</groupId>
179
				<artifactId>spring-boot-maven-plugin</artifactId>
180
				<configuration>
181
					<fork>true</fork>
182
				</configuration>
183
			</plugin>
184
		</plugins>
185
	</build>-->
186

187
	<build>
188
		<plugins>
189
			<plugin>
190
				<artifactId>maven-compiler-plugin</artifactId>
191
				<configuration>
192
					<source>${compiler-version}</source>
193
					<target>${compiler-version}</target>
194
					<encoding>${encoding}</encoding>
195
					<!-- 通过此方法添加本地jar -->
196
					<compilerArguments>
197
						<!--suppress UnresolvedMavenProperty -->
198
						<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
199
						<extdirs>${project.basedir}/libs</extdirs>
200
					</compilerArguments>
201
				</configuration>
202
			</plugin>
203
			<plugin>
204
				<groupId>org.apache.maven.plugins</groupId>
205
				<artifactId>maven-surefire-plugin</artifactId>
206
				<configuration>
207
					<skip>true</skip>
208
				</configuration>
209
			</plugin>
210
			<!-- ==========应用包和依赖包分离的打包方法================ -->
211
			<plugin>
212
				<groupId>org.apache.maven.plugins</groupId>
213
				<artifactId>maven-resources-plugin</artifactId>
214
				<executions>
215
					<execution>
216
						<id>copy-resources</id>
217
						<phase>compile</phase>
218
						<goals>
219
							<goal>copy-resources</goal>
220
						</goals>
221
						<configuration>
222
							<encoding>${encoding}</encoding>
223
							<resources>
224
								<resource>
225
									<directory>${project.build.directory}/classes</directory>
226
									<includes>
227
										<include>**/*.properties</include>
228
										<include>**/*.xml</include>
229
										<include>**/*.yaml</include>
230
										<include>**/*.yml</include>
231
										<include>**/*.txt</include>
232
									</includes>
233
								</resource>
234
							</resources>
235
							<!-- 表示把配置文件拷到和jar包同一个路径下 -->
236
							<outputDirectory>
237
								${project.build.directory}/config
238
							</outputDirectory>
239
						</configuration>
240
					</execution>
241
				</executions>
242
			</plugin>
243
			<!-- 复制依赖包 -->
244
			<plugin>
245
				<groupId>org.apache.maven.plugins</groupId>
246
				<artifactId>maven-dependency-plugin</artifactId>
247
				<executions>
248
					<execution>
249
						<id>copy-dependencies</id>
250
						<phase>package</phase>
251
						<goals>
252
							<goal>copy-dependencies</goal>
253
						</goals>
254
						<configuration>
255
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
256
						</configuration>
257
					</execution>
258
				</executions>
259
			</plugin>
260
			<plugin>
261
				<groupId>org.apache.maven.plugins</groupId>
262
				<artifactId>maven-jar-plugin</artifactId>
263
				<configuration>
264
					<archive>
265
						<!--生成的jar中,不要包含pom.xml和pom.properties这两个文件-->
266
						<addMavenDescriptor>false</addMavenDescriptor>
267
						<manifest>
268
							<!--是否要把第三方jar放到manifest的classpath中-->
269
							<addClasspath>true</addClasspath>
270
							<!--生成的manifest中classpath的前缀,lib存放第三方jar-->
271
							<classpathPrefix>lib/</classpathPrefix>
272
							<!--应用的main class-->
273
							<mainClass>${start-class}</mainClass>
274
							<!-- 去掉jar后的时间戳 -->
275
							<useUniqueVersions>false</useUniqueVersions>
276
						</manifest>
277
						<!-- 自定义的MANIFEST.MF参数 -->
278
						<manifestEntries>
279
							<!-- 增加classpath目录config -->
280
							<Class-Path>./config/</Class-Path>
281
						</manifestEntries>
282
					</archive>
283
					<!--过滤掉不希望包含在jar中的文件-->
284
					<excludes>
285
						<exclude>**/*.properties</exclude>
286
						<exclude>**/*.xml</exclude>
287
						<exclude>**/*.yaml</exclude>
288
						<exclude>**/*.yml</exclude>
289
						<exclude>**/*.txt</exclude>
290
					</excludes>
291
				</configuration>
292
			</plugin>
293

294
			<plugin>
295
				<groupId>org.apache.maven.plugins</groupId>
296
				<artifactId>maven-assembly-plugin</artifactId>
297
				<version>2.4</version>
298
				<!-- The configuration of the plugin -->
299
				<configuration>
300
					<!-- Specifies the configuration file of the assembly plugin -->
301
					<descriptors>
302
						<descriptor>src/main/assembly-package.xml</descriptor>
303
					</descriptors>
304
				</configuration>
305
				<executions>
306
					<execution>
307
						<id>make-assembly</id>
308
						<phase>package</phase>
309
						<goals>
310
							<goal>single</goal>
311
						</goals>
312
					</execution>
313
				</executions>
314
			</plugin>
315
		</plugins>
316
		<finalName>${project.artifactId}</finalName>
317
	</build>
318
</project>