|
|
<?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>
|
|
|
|
|
|
<!--Maven坐标-->
|
|
|
<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使用JDK1.8-->
|
|
|
<java.version>1.8</java.version>
|
|
|
<!--SpringCloud的版本-->
|
|
|
<spring-cloud.version>Dalston.SR1</spring-cloud.version>
|
|
|
<!--SpringBoot的版本,居然是1.5.22,这版本也太低了~-->
|
|
|
<spring-boot.version>1.5.22.RELEASE</spring-boot.version>
|
|
|
<spring-boot-maven-plugin.version>1.5.22.RELEASE</spring-boot-maven-plugin.version>
|
|
|
<!--引入JFinal-->
|
|
|
<jfinal.version>5.2.0</jfinal.version>
|
|
|
<!--Druid版本号-->
|
|
|
<druid.version>1.2.23</druid.version>
|
|
|
<!--Mysql驱动版本号-->
|
|
|
<mysql.version>5.1.49</mysql.version>
|
|
|
<!--fastjson版本号-->
|
|
|
<fastjson.version>2.0.52</fastjson.version>
|
|
|
<!--Hutool工具包-->
|
|
|
<hutool.version>5.8.29</hutool.version>
|
|
|
<!--lombok版本-->
|
|
|
<lombok.version>1.18.24</lombok.version>
|
|
|
<!--mapper版本-->
|
|
|
<mapper.version>4.1.2</mapper.version>
|
|
|
<mapper-spring-boot-starter.version>2.1.5</mapper-spring-boot-starter.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>
|
|
|
<!--排除掉Tomcat8-->
|
|
|
<exclusions>
|
|
|
<exclusion>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
</exclusion>
|
|
|
</exclusions>
|
|
|
</dependency>
|
|
|
<!--使用Undertow-->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-undertow</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.cloud</groupId>
|
|
|
<artifactId>spring-cloud-starter-feign</artifactId>
|
|
|
</dependency>
|
|
|
</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>
|
|
|
<!--在我们持续集成过程中,项目工程一般使用 Maven 编译打包,然后生成镜像,通过镜像上线,能够大大提供上线效率,同时能够快速动态扩容,快速回滚,着实很方便。docker-maven-plugin 插件就是为了帮助我们在Maven工程中,通过简单的配置,自动生成镜像并推送到仓库中-->
|
|
|
<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>
|
|
|
</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> |