123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <?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">
- <parent>
- <artifactId>demo</artifactId>
- <groupId>com.lyg</groupId>
- <version>0.0.1</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>application</artifactId>
-
- <properties>
- <maven.compiler.source>8</maven.compiler.source>
- <maven.compiler.target>8</maven.compiler.target>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.lyg</groupId>
- <artifactId>common</artifactId>
- <version>0.0.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.lyg</groupId>
- <artifactId>framework</artifactId>
- <version>0.0.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.lyg</groupId>
- <artifactId>system</artifactId>
- <version>0.0.1</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <!-- 只打包业务代码 -->
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <layout>ZIP</layout>
- <includeSystemScope>true</includeSystemScope>
- <mainClass>com.lyg.YZApplication</mainClass>
- <includes>
- <include>
- <groupId>com.lyg</groupId>
- <artifactId>common</artifactId>
- </include>
- <include>
- <groupId>com.lyg</groupId>
- <artifactId>framework</artifactId>
- </include>
- <include>
- <groupId>com.lyg</groupId>
- <artifactId>system</artifactId>
- </include>
- </includes>
- <excludes>
- <exclude>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- 跳过单元测试 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
-
- <!-- 第三方依赖包单独打包 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>target/lib</outputDirectory>
- <stripVersion>false</stripVersion>
- <!-- 不包含哪些jar包 -->
- <excludeGroupIds>
- <!-- 只排除业务模块相关的jar包,多个用英文逗号分割-->
- com.lyg
- </excludeGroupIds>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- 把配置文件单独拷贝出来 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>target/config</outputDirectory>
- <resources>
- <resource>
- <directory>./src/main/resources</directory>
- </resource>
- <resource>
- <directory>../framework/src/main/resources</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>./src/main/resources/</directory>
- <includes>
- <include>**/**</include>
- </includes>
- </resource>
- <resource>
- <directory>../framework/src/main/resources/</directory>
- <includes>
- <include>**/**</include>
- </includes>
- </resource>
- </resources>
- </build>
- </project>
|