|
|
@@ -0,0 +1,85 @@ |
|
|
|
<?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"> |
|
|
|
<parent> |
|
|
|
<artifactId>jdchain-root</artifactId> |
|
|
|
<groupId>com.jd.blockchain</groupId> |
|
|
|
<version>1.2.1.RELEASE</version> |
|
|
|
<relativePath>../../pom.xml</relativePath> |
|
|
|
</parent> |
|
|
|
<version>1.3.0</version> |
|
|
|
<modelVersion>4.0.0</modelVersion> |
|
|
|
|
|
|
|
<artifactId>docker-demo</artifactId> |
|
|
|
|
|
|
|
<build> |
|
|
|
<finalName>jdchain-demo</finalName> |
|
|
|
<plugins> |
|
|
|
<plugin> |
|
|
|
<artifactId>maven-resources-plugin</artifactId> |
|
|
|
<version>3.0.2</version> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<id>copy-resources</id> |
|
|
|
<phase>validate</phase> |
|
|
|
<goals> |
|
|
|
<goal>copy-resources</goal> |
|
|
|
</goals> |
|
|
|
<configuration> |
|
|
|
<!-- 将资源文件拷贝到config目录下 --> |
|
|
|
<encoding>UTF-8</encoding> |
|
|
|
<outputDirectory>${project.basedir}/src/main/docker/zip</outputDirectory> |
|
|
|
<overwrite>false</overwrite> |
|
|
|
<resources> |
|
|
|
<resource> |
|
|
|
<directory>${project.basedir}/../deploy-peer/target/</directory> |
|
|
|
<filtering>false</filtering> |
|
|
|
<includes> |
|
|
|
<include>jdchain-peer-${project.version}.RELEASE.zip</include> |
|
|
|
</includes> |
|
|
|
</resource> |
|
|
|
|
|
|
|
<resource> |
|
|
|
<directory>${project.basedir}/../deploy-gateway/target/</directory> |
|
|
|
<filtering>false</filtering> |
|
|
|
<includes> |
|
|
|
<include>jdchain-gateway-${project.version}.RELEASE.zip</include> |
|
|
|
</includes> |
|
|
|
</resource> |
|
|
|
</resources> |
|
|
|
</configuration> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
</plugin> |
|
|
|
|
|
|
|
<!-- 使用Maven插件直接将应用打包为一个Docker镜像 --> |
|
|
|
<plugin> |
|
|
|
<groupId>com.spotify</groupId> |
|
|
|
<artifactId>docker-maven-plugin</artifactId> |
|
|
|
<version>1.2.2</version> |
|
|
|
|
|
|
|
<!--将插件绑定在某个phase执行--> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<id>build-image</id> |
|
|
|
<!--将插件绑定在package这个phase上。也就是说,用户只需执行mvn package ,就会自动执行mvn docker:build--> |
|
|
|
<phase>package</phase> |
|
|
|
<goals> |
|
|
|
<goal>build</goal> |
|
|
|
</goals> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
|
|
|
|
<configuration> |
|
|
|
|
|
|
|
<imageName>jdchain-demo</imageName> |
|
|
|
<imageTags>${project.version}</imageTags> |
|
|
|
<!-- 指定 Dockerfile 路径--> |
|
|
|
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> |
|
|
|
</configuration> |
|
|
|
</plugin> |
|
|
|
</plugins> |
|
|
|
</build> |
|
|
|
|
|
|
|
</project> |