|
|
|
|
<?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/xsd/maven-4.0.0.xsd">
|
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
|
|
|
|
<groupId>com.icharge.framework</groupId>
|
|
|
|
|
<artifactId>rough-dependencies</artifactId>
|
|
|
|
|
<version>1.0.0</version>
|
|
|
|
|
<packaging>pom</packaging>
|
|
|
|
|
|
|
|
|
|
<distributionManagement>
|
|
|
|
|
<repository>
|
|
|
|
|
<id>nexus-releases</id>
|
|
|
|
|
<name>Releases</name>
|
|
|
|
|
<url>https://nexus.ikbvip.com/repository/kb-releases/</url>
|
|
|
|
|
</repository>
|
|
|
|
|
<snapshotRepository>
|
|
|
|
|
<id>nexus-snapshots</id>
|
|
|
|
|
<name>Snapshot</name>
|
|
|
|
|
<url>https://nexus.ikbvip.com/repository/kb-snapshots/</url>
|
|
|
|
|
</snapshotRepository>
|
|
|
|
|
</distributionManagement>
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
|
|
|
<java.version>1.8</java.version>
|
|
|
|
|
<spring-cloud.version>Dalston.SR1</spring-cloud.version>
|
|
|
|
|
<spring-boot.version>1.5.10.RELEASE</spring-boot.version>
|
|
|
|
|
<spring-boot-maven-plugin.version>1.5.6.RELEASE</spring-boot-maven-plugin.version>
|
|
|
|
|
<registryUrl>yourdomain.com</registryUrl>
|
|
|
|
|
<registryProject>ycharge</registryProject>
|
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dependencyManagement>
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
<!-- Import dependency management from Spring Boot (依赖管理:继承一些默认的依赖,工程需要依赖的jar包的管理,申明其他dependency的时候就不需要version) -->
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
|
|
|
<version>${spring-boot.version}</version>
|
|
|
|
|
<type>pom</type>
|
|
|
|
|
<scope>import</scope>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
<artifactId>spring-cloud-dependencies</artifactId>
|
|
|
|
|
<version>${spring-cloud.version}</version>
|
|
|
|
|
<type>pom</type>
|
|
|
|
|
<scope>import</scope>
|
|
|
|
|
</dependency>
|
|
|
|
|
</dependencies>
|
|
|
|
|
</dependencyManagement>
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
<!-- springboot start -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-devtools</artifactId>
|
|
|
|
|
<optional>true</optional>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
|
|
|
<optional>true</optional>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!--<dependency>-->
|
|
|
|
|
<!--<groupId>org.springframework.boot</groupId>-->
|
|
|
|
|
<!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
|
|
|
|
|
<!--</dependency>-->
|
|
|
|
|
<!--<dependency>-->
|
|
|
|
|
<!--<groupId>org.springframework.session</groupId>-->
|
|
|
|
|
<!--<artifactId>spring-session</artifactId>-->
|
|
|
|
|
<!--</dependency>-->
|
|
|
|
|
|
|
|
|
|
<!-- springboot end -->
|
|
|
|
|
|
|
|
|
|
<!-- springcloud start -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
<artifactId>spring-cloud-starter-feign</artifactId>
|
|
|
|
|
</dependency>
|
|
|
|
|
<!--<dependency>-->
|
|
|
|
|
<!--<groupId>org.springframework.cloud</groupId>-->
|
|
|
|
|
<!--<artifactId>spring-cloud-starter-config</artifactId>-->
|
|
|
|
|
<!--</dependency>-->
|
|
|
|
|
<!-- springcloud end -->
|
|
|
|
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
<plugins>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
|
<version>2.3.5.RELEASE</version>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
|
|
|
<version>3.0.0-M1</version>
|
|
|
|
|
<configuration>
|
|
|
|
|
<skip>false</skip>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
|
<version>3.6.1</version>
|
|
|
|
|
<configuration>
|
|
|
|
|
<source>1.8</source>
|
|
|
|
|
<target>1.8</target>
|
|
|
|
|
<encoding>UTF-8</encoding>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>com.spotify</groupId>
|
|
|
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
|
|
|
<version>1.2.0</version>
|
|
|
|
|
<configuration>
|
|
|
|
|
<imageName>${registryUrl}/${registryProject}/${project.name}</imageName>
|
|
|
|
|
<pushImage>true</pushImage>
|
|
|
|
|
<retryPushCount>2</retryPushCount>
|
|
|
|
|
<registryUrl>${registryUrl}</registryUrl>
|
|
|
|
|
<imageTags>
|
|
|
|
|
<imageTag>${project.version}</imageTag>
|
|
|
|
|
</imageTags>
|
|
|
|
|
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
|
|
|
|
|
<resources>
|
|
|
|
|
<resource>
|
|
|
|
|
<targetPath>/</targetPath>
|
|
|
|
|
<directory>${project.build.directory}</directory>
|
|
|
|
|
<include>${project.build.finalName}.${project.packaging}</include>
|
|
|
|
|
</resource>
|
|
|
|
|
</resources>
|
|
|
|
|
<!--目标镜像仓库-->
|
|
|
|
|
<serverId>my-docker-registry</serverId>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
|
<version>2.4.2</version>
|
|
|
|
|
<configuration>
|
|
|
|
|
<skipTests>false</skipTests>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
<!--<plugin>-->
|
|
|
|
|
<!--<groupId>com.spotify</groupId>-->
|
|
|
|
|
<!--<artifactId>dockerfile-maven-plugin</artifactId>-->
|
|
|
|
|
<!--<version>1.4.10</version>-->
|
|
|
|
|
<!--<executions>-->
|
|
|
|
|
<!--<execution>-->
|
|
|
|
|
<!--<id>default</id>-->
|
|
|
|
|
<!--<goals>-->
|
|
|
|
|
<!--<!–如果package时不想用docker打包,就注释掉这个goal–>-->
|
|
|
|
|
<!--<goal>build</goal>-->
|
|
|
|
|
<!--<goal>push</goal>-->
|
|
|
|
|
<!--</goals>-->
|
|
|
|
|
<!--</execution>-->
|
|
|
|
|
<!--</executions>-->
|
|
|
|
|
<!--<configuration>-->
|
|
|
|
|
<!--<dockerfile>${project.basedir}/${project.name}/src/main/docker</dockerfile>-->
|
|
|
|
|
<!--<repository>${registryUrl}/ycharge/${project.name}</repository>-->
|
|
|
|
|
<!--<tag>${project.version}</tag>-->
|
|
|
|
|
<!--<buildArgs>-->
|
|
|
|
|
<!--<!–提供参数向Dockerfile传递–>-->
|
|
|
|
|
<!--<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>-->
|
|
|
|
|
<!--</buildArgs>-->
|
|
|
|
|
<!--</configuration>-->
|
|
|
|
|
<!--</plugin>-->
|
|
|
|
|
</plugins>
|
|
|
|
|
|
|
|
|
|
</build>
|
|
|
|
|
|
|
|
|
|
<profiles>
|
|
|
|
|
<profile>
|
|
|
|
|
<id>docker-rz</id>
|
|
|
|
|
<properties>
|
|
|
|
|
<registryUrl>192.168.1.108</registryUrl>
|
|
|
|
|
<registryProject>rzyc</registryProject>
|
|
|
|
|
</properties>
|
|
|
|
|
</profile>
|
|
|
|
|
<profile>
|
|
|
|
|
<id>docker-ylt</id>
|
|
|
|
|
<properties>
|
|
|
|
|
<registryUrl>192.168.1.108</registryUrl>
|
|
|
|
|
<registryProject>ylt</registryProject>
|
|
|
|
|
</properties>
|
|
|
|
|
</profile>
|
|
|
|
|
</profiles>
|
|
|
|
|
</project>
|