-
Notifications
You must be signed in to change notification settings - Fork 133
/
pom.xml
106 lines (95 loc) · 4.3 KB
/
pom.xml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
</parent>
<groupId>com.spring2go.samples</groupId>
<artifactId>spring-petclinic-msa</artifactId>
<version>1.0.0.RELEASE</version>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<modules>
<module>customers-service</module>
<module>vets-service</module>
<module>visits-service</module>
<module>web-app</module>
<module>cloud-gateway</module>
</modules>
<properties>
<java.version>1.8</java.version>
<!-- Docker build -->
<docker.image.prefix>spring2go</docker.image.prefix>
<docker.image.exposed.port>8080</docker.image.exposed.port>
<dockerfile.plugin.version>1.4.13</dockerfile.plugin.version>
<docker.image.tag>${project.version}</docker.image.tag>
<dockerfile.maven.settings.auth>true</dockerfile.maven.settings.auth>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
<executions>
<execution>
<!-- Spring Boot Actuator displays build-related information if a META-INF/build-info.properties file is present -->
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<encoding.source>${project.build.sourceEncoding}</encoding.source>
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
<java.source>${maven.compiler.source}</java.source>
<java.target>${maven.compiler.target}</java.target>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Spotify Dockerfile Maven -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile.plugin.version}</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository>
<contextDirectory>${basedir}</contextDirectory>
<tag>${docker.image.tag}</tag>
<!-- 注意在本地.m2/settings.xml中设置dockerhub账号和密码 -->
<useMavenSettingsForAuth>${dockerfile.maven.settings.auth}</useMavenSettingsForAuth>
<buildArgs>
<ARTIFACT_NAME>target/${project.build.finalName}</ARTIFACT_NAME>
<EXPOSED_PORT>${docker.image.exposed.port}</EXPOSED_PORT>
</buildArgs>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>