|
@@ -24,6 +24,35 @@
|
|
|
<maven.test.skip>true</maven.test.skip>
|
|
|
</properties>
|
|
|
|
|
|
+ <profiles>
|
|
|
+ <profile>
|
|
|
+ <id>dev</id>
|
|
|
+ <!--默认激活当前配置-->
|
|
|
+ <activation>
|
|
|
+ <activeByDefault>true</activeByDefault>
|
|
|
+ </activation>
|
|
|
+ <properties>
|
|
|
+ <spring.profiles.active>dev</spring.profiles.active>
|
|
|
+ <profiles.active>dev</profiles.active>
|
|
|
+ <!-- Docker 配置 -->
|
|
|
+ <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
|
|
|
+<!-- <docker.serviceId>DockerHub</docker.serviceId>-->
|
|
|
+ <docker.image.version>1.0.0</docker.image.version>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>prod</id>
|
|
|
+ <properties>
|
|
|
+ <spring.profiles.active>prod</spring.profiles.active>
|
|
|
+ <profiles.active>prod</profiles.active>
|
|
|
+ <!-- Docker 配置 -->
|
|
|
+ <docker.dockerHost>http://192.168.1.102:22375</docker.dockerHost>
|
|
|
+<!-- <docker.serviceId>DockerHub</docker.serviceId>-->
|
|
|
+ <docker.image.version>1.0.0</docker.image.version>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
+
|
|
|
<dependencies>
|
|
|
|
|
|
<dependency>
|
|
@@ -142,17 +171,7 @@
|
|
|
</developer>
|
|
|
</developers>
|
|
|
|
|
|
- <profiles>
|
|
|
- <profile>
|
|
|
- <id>dev</id>
|
|
|
- <properties>
|
|
|
- <spring.profiles.active>dev</spring.profiles.active>
|
|
|
- </properties>
|
|
|
- <activation>
|
|
|
- <activeByDefault>true</activeByDefault>
|
|
|
- </activation>
|
|
|
- </profile>
|
|
|
- </profiles>
|
|
|
+
|
|
|
|
|
|
<build>
|
|
|
<resources>
|
|
@@ -199,6 +218,36 @@
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
+ <version>2.18.1</version>
|
|
|
+ <configuration>
|
|
|
+ <skipTests>true</skipTests>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>com.spotify</groupId>
|
|
|
+ <artifactId>docker-maven-plugin</artifactId>
|
|
|
+ <version>1.2.2</version>
|
|
|
+ <configuration>
|
|
|
+<!-- <serverId>${docker.serviceId}</serverId>-->
|
|
|
+ <dockerHost>${docker.dockerHost}</dockerHost>
|
|
|
+ <!--指定标签-->
|
|
|
+ <imageTags>
|
|
|
+ <imageTag>${docker.image.version}</imageTag>
|
|
|
+ </imageTags>
|
|
|
+ <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
|
|
|
+ <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <targetPath>/</targetPath>
|
|
|
+ <directory>${project.build.directory}</directory>
|
|
|
+ <include>${project.build.finalName}.jar</include>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
</plugins>
|
|
|
</build>
|
|
|
</project>
|