|
|
@@ -290,67 +290,53 @@
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<plugin>
|
|
|
+ <!-- 指定项目编译时的java版本和编码方式 -->
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <target>1.8</target>
|
|
|
+ <source>1.8</source>
|
|
|
+ <encoding>UTF-8</encoding>
|
|
|
+ <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <archive>
|
|
|
+ <manifest>
|
|
|
+ <!-- 是否要把第三方jar加入到类构建路径 -->
|
|
|
+ <addClasspath>true</addClasspath>
|
|
|
+ <!-- 外部依赖jar包的最终位置 -->
|
|
|
+ <classpathPrefix>lib/</classpathPrefix>
|
|
|
+ <!--指定jar程序入口-->
|
|
|
+ <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
|
|
|
+ </manifest>
|
|
|
+ </archive>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <!--拷贝依赖到jar外面的lib目录-->
|
|
|
+ <plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
- <version>3.1.2</version> <!-- 使用最新版本 -->
|
|
|
<executions>
|
|
|
<execution>
|
|
|
<id>copy-dependencies</id>
|
|
|
- <phase>prepare-package</phase> <!-- 在package之前执行 -->
|
|
|
+ <phase>prepare-package</phase>
|
|
|
<goals>
|
|
|
<goal>copy-dependencies</goal>
|
|
|
</goals>
|
|
|
<configuration>
|
|
|
- <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
|
|
|
- <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
|
|
|
+ <!-- 拷贝项目依赖包到lib/目录下 -->
|
|
|
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
|
+ <overWriteReleases>false</overWriteReleases>
|
|
|
+ <overWriteSnapshots>false</overWriteSnapshots>
|
|
|
+ <overWriteIfNewer>true</overWriteIfNewer>
|
|
|
</configuration>
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
- <plugin>
|
|
|
- <groupId>org.springframework.boot</groupId>
|
|
|
- <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
- <configuration>
|
|
|
- <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
|
|
|
- <layout>ZIP</layout>
|
|
|
- <includes>
|
|
|
- <include>
|
|
|
- <groupId>nothing</groupId>
|
|
|
- <artifactId>nothing</artifactId>
|
|
|
- </include>
|
|
|
- </includes>
|
|
|
- </configuration>
|
|
|
- <executions>
|
|
|
- <execution>
|
|
|
- <goals>
|
|
|
- <goal>repackage</goal>
|
|
|
- </goals>
|
|
|
- </execution>
|
|
|
- </executions>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
- <configuration>
|
|
|
- <source>8</source>
|
|
|
- <target>8</target>
|
|
|
- </configuration>
|
|
|
- </plugin>
|
|
|
</plugins>
|
|
|
</build>
|
|
|
- <profiles>
|
|
|
- <profile>
|
|
|
- <id>test</id>
|
|
|
- <properties>
|
|
|
- <profiles.active>test</profiles.active>
|
|
|
- <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
|
|
|
- <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
|
|
|
- <nacos.username>nacos</nacos.username>
|
|
|
- <nacos.password>ngfriend198092</nacos.password>
|
|
|
- </properties>
|
|
|
- <activation>
|
|
|
- <activeByDefault>true</activeByDefault>
|
|
|
- </activation>
|
|
|
- </profile>
|
|
|
- </profiles>
|
|
|
</project>
|