18048805296
2023-02-17 c03a1f6a18af7cf8cd5283c8edef5541da1666e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.lx</groupId>
        <artifactId>product-server</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
    <artifactId>product-server-seal</artifactId>
    <name>product-server-seal</name>
    <description>product-server-seal</description>
    <dependencies>
        <dependency>
            <groupId>com.lx</groupId>
            <artifactId>product-server-common</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.lx</groupId>
            <artifactId>product-server-util</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.lx</groupId>
            <artifactId>product-server-core</artifactId>
            <version>1.0.0-releases</version>
        </dependency>
        <dependency>
            <groupId>org.spring</groupId>
            <artifactId>spring-server-master</artifactId>
        <version>1.2.6.6</version>
    </dependency>
    </dependencies>
    <build>
        <plugins>
        <!-- 打JAR包 -->
 
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <!-- 不打包资源文件(配置文件和依赖包分开) -->
                    <excludes>
                        <exclude>*.properties</exclude>
                        <exclude>*.xml</exclude>
                    </excludes>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <!-- MANIFEST.MF 中 Class-Path 加入前缀 -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <!-- jar包不包含唯一版本标识 -->
                            <useUniqueVersions>true</useUniqueVersions>
                            <!--指定入口类 -->
                            <mainClass>com.product.Application</mainClass>
                        </manifest>
                        <manifestEntries>
                            <!--MANIFEST.MF 中 Class-Path 加入资源文件目录 -->
                            <Class-Path>./resources/</Class-Path>
                        </manifestEntries>
 
                    </archive>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
            </plugin>
            <!-- 拷贝文件 -->
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <copy file="${project.build.directory}/product-server-seal-1.0.0-SNAPSHOT.jar"
                                      tofile="D:/product/workspace/product-server-install/resources/product-server/product-server-web-1.0.0-SNAPSHOT.jar"
                                      overwrite="true"/>
                            </tasks>
 
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
 
        </plugins>
    </build>
</project>