|
@@ -305,17 +305,7 @@
|
|
|
<groupId>org.springframework</groupId>
|
|
<groupId>org.springframework</groupId>
|
|
|
<artifactId>spring-test</artifactId>
|
|
<artifactId>spring-test</artifactId>
|
|
|
</dependency>
|
|
</dependency>
|
|
|
- <dependency>
|
|
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
- <artifactId>maven-resources-plugin</artifactId>
|
|
|
|
|
- <version>2.4.3</version>
|
|
|
|
|
- </dependency>
|
|
|
|
|
|
|
|
|
|
- <dependency>
|
|
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
|
|
|
- <version>3.1.0</version>
|
|
|
|
|
- </dependency>
|
|
|
|
|
</dependencies>
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
<build>
|
|
@@ -339,6 +329,13 @@
|
|
|
<version>${spring.boot.version}</version>
|
|
<version>${spring.boot.version}</version>
|
|
|
<configuration>
|
|
<configuration>
|
|
|
<finalName>${project.build.finalName}</finalName>
|
|
<finalName>${project.build.finalName}</finalName>
|
|
|
|
|
+ <layout>ZIP</layout>
|
|
|
|
|
+ <includes>
|
|
|
|
|
+ <include>
|
|
|
|
|
+ <groupId>non-exists</groupId>
|
|
|
|
|
+ <artifactId>non-exists</artifactId>
|
|
|
|
|
+ </include>
|
|
|
|
|
+ </includes>
|
|
|
</configuration>
|
|
</configuration>
|
|
|
<executions>
|
|
<executions>
|
|
|
<execution>
|
|
<execution>
|
|
@@ -348,35 +345,9 @@
|
|
|
</execution>
|
|
</execution>
|
|
|
</executions>
|
|
</executions>
|
|
|
</plugin>
|
|
</plugin>
|
|
|
- <plugin>
|
|
|
|
|
- <groupId>com.spotify</groupId>
|
|
|
|
|
- <artifactId>dockerfile-maven-plugin</artifactId>
|
|
|
|
|
- <version>${docker.plugin.version}</version>
|
|
|
|
|
- <configuration>
|
|
|
|
|
- <username>${docker.username}</username>
|
|
|
|
|
- <password>${docker.password}</password>
|
|
|
|
|
- <repository>${docker.registry.url}/${docker.namespace}/${project.build.finalName}</repository>
|
|
|
|
|
- <tag>${project.version}</tag>
|
|
|
|
|
- <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
|
|
|
|
|
- <buildArgs>
|
|
|
|
|
- <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
|
|
|
|
|
- </buildArgs>
|
|
|
|
|
- </configuration>
|
|
|
|
|
- <!--添加如下配置,运行 mvn deploy 命令便会自动打包镜像-->
|
|
|
|
|
- <!--<executions>
|
|
|
|
|
- <execution>
|
|
|
|
|
- <id>default</id>
|
|
|
|
|
- <goals>
|
|
|
|
|
- <goal>build</goal>
|
|
|
|
|
- <goal>push</goal>
|
|
|
|
|
- </goals>
|
|
|
|
|
- </execution>
|
|
|
|
|
- </executions>-->
|
|
|
|
|
- </plugin>
|
|
|
|
|
</plugins>
|
|
</plugins>
|
|
|
</pluginManagement>
|
|
</pluginManagement>
|
|
|
<plugins>
|
|
<plugins>
|
|
|
- <!--设置 SpringBoot 打包插件不包含任何 Jar 依赖包-->
|
|
|
|
|
<plugin>
|
|
<plugin>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
@@ -393,6 +364,33 @@
|
|
|
</compilerArgs>
|
|
</compilerArgs>
|
|
|
</configuration>
|
|
</configuration>
|
|
|
</plugin>
|
|
</plugin>
|
|
|
|
|
+ <plugin>
|
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
|
+ <configuration>
|
|
|
|
|
+ <testFailureIgnore>true</testFailureIgnore>
|
|
|
|
|
+ </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>
|
|
|
|
|
+ <!--target/lib是依赖jar包的输出目录,根据自己喜好配置-->
|
|
|
|
|
+ <outputDirectory>target/lib</outputDirectory>
|
|
|
|
|
+ <excludeTransitive>false</excludeTransitive>
|
|
|
|
|
+ <stripVersion>false</stripVersion>
|
|
|
|
|
+ <includeScope>runtime</includeScope>
|
|
|
|
|
+ </configuration>
|
|
|
|
|
+ </execution>
|
|
|
|
|
+ </executions>
|
|
|
|
|
+ </plugin>
|
|
|
</plugins>
|
|
</plugins>
|
|
|
</build>
|
|
</build>
|
|
|
|
|
|