|
@@ -10,7 +10,7 @@
|
|
|
</parent>
|
|
|
<groupId>com.xin</groupId>
|
|
|
<artifactId>shardingsphere-jdbc-study</artifactId>
|
|
|
- <version>0.0.1-SNAPSHOT</version>
|
|
|
+ <version>0.0.1</version>
|
|
|
<name>shardingsphere-jdbc-study</name>
|
|
|
<description>Demo project for Spring Boot</description>
|
|
|
|
|
@@ -25,6 +25,33 @@
|
|
|
<apache.poi.version>3.15</apache.poi.version>
|
|
|
<poi.ooxml.version>3.15</poi.ooxml.version>
|
|
|
</properties>
|
|
|
+ <profiles>
|
|
|
+
|
|
|
+ <profile>
|
|
|
+ <id>test</id>
|
|
|
+ <!--默认激活当前配置-->
|
|
|
+ <activation>
|
|
|
+ <activeByDefault>true</activeByDefault>
|
|
|
+ </activation>
|
|
|
+ <properties>
|
|
|
+ <profiles.active>test</profiles.active>
|
|
|
+ <!-- Docker 配置 -->
|
|
|
+ <docker.dockerHost>http://192.168.29.131:2375</docker.dockerHost>
|
|
|
+ <!-- <docker.serviceId>DockerHub</docker.serviceId>-->
|
|
|
+ <docker.image.version>1.0.0</docker.image.version>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+<!-- <profile>-->
|
|
|
+<!-- <id>dev</id>-->
|
|
|
+<!-- <properties>-->
|
|
|
+<!-- <profiles.active>dev</profiles.active>-->
|
|
|
+<!-- <!– Docker 配置 –>-->
|
|
|
+<!-- <docker.dockerHost>https://49.235.127.212:2375</docker.dockerHost>-->
|
|
|
+<!-- <!– <docker.serviceId>DockerHub</docker.serviceId>–>-->
|
|
|
+<!-- <docker.image.version>1.0.0</docker.image.version>-->
|
|
|
+<!-- </properties>-->
|
|
|
+<!-- </profile>-->
|
|
|
+ </profiles>
|
|
|
|
|
|
<dependencies>
|
|
|
<dependency>
|
|
@@ -126,7 +153,55 @@
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
</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>
|
|
|
+ <!-- 镜像名称 guoweixin/exam-->
|
|
|
+ <imageName>${project.artifactId}</imageName>
|
|
|
+ <!--指定标签-->
|
|
|
+ <imageTags>
|
|
|
+ <imageTag>${docker.image.version}</imageTag>
|
|
|
+ </imageTags>
|
|
|
+ <!-- 基础镜像jdk 1.8-->
|
|
|
+ <baseImage>java</baseImage>
|
|
|
+ <!-- 制作者提供本人信息 -->
|
|
|
+ <maintainer>2292011451@qq.com</maintainer>
|
|
|
+ <!--切换到/ROOT目录 -->
|
|
|
+ <workdir>/ROOT</workdir>
|
|
|
+ <cmd>["java", "-version"]</cmd>
|
|
|
+ <entryPoint>["java", "-jar", "${project.build.finalName}.jar"]</entryPoint>
|
|
|
+ <!-- 指定 Dockerfile 路径
|
|
|
+ <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
|
|
|
+ -->
|
|
|
+ <!--指定远程 docker api地址-->
|
|
|
+ <dockerHost>${docker.dockerHost}</dockerHost>
|
|
|
+ <!--证书路劲-->
|
|
|
+<!-- <dockerCertPath>D:\software\docker</dockerCertPath>-->
|
|
|
+ <!-- 这里是复制 jar 包到 docker 容器指定目录配置 -->
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <targetPath>/ROOT</targetPath>
|
|
|
+ <!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
|
|
+ <directory>${project.build.directory}</directory>
|
|
|
+ <!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
|
|
+ <include>${project.build.finalName}.jar</include>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
</plugins>
|
|
|
+
|
|
|
</build>
|
|
|
|
|
|
</project>
|