Commit 14085cf6 by 钟明宏

还原版本

parent f3f70647
......@@ -426,11 +426,9 @@ public class BuildMojo extends AbstractDockerMojo {
final List<String> copiedPaths = copyResources(destination);
createDockerFile(destination, copiedPaths);
} else {
if (resources.size() == 0) {
final Resource resource = new Resource();
resource.setDirectory(dockerDirectory);
resources.add(resource);
}
final Resource resource = new Resource();
resource.setDirectory(dockerDirectory);
resources.add(resource);
copyResources(destination);
}
......
......@@ -68,7 +68,6 @@ public class RemoveImageMojo extends AbstractDockerMojo {
@Override
protected void execute(final DockerClient docker)
throws MojoExecutionException, DockerException, InterruptedException {
getLog().info("开始移除镜像");
final String[] imageNameParts = parseImageName(imageName);
if (imageTags == null) {
imageTags = new ArrayList<>(1);
......
......@@ -95,7 +95,6 @@ public class TagMojo extends AbstractDockerMojo {
protected void execute(DockerClient docker)
throws MojoExecutionException, DockerException,
IOException, InterruptedException, GitAPIException {
getLog().info("开始打tag");
if (skipDockerTag) {
getLog().info("Skipping docker tag");
return;
......
......@@ -2,40 +2,41 @@
<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>
<modelVersion>4.0.0</modelVersion>
<name>Docker Maven Plugin Test Pom</name>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Docker Maven Plugin Test Pom</name>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<configuration>
<dockerHost>http://host:2375</dockerHost>
<!-- test that dockerDirectory works correctly -->
<dockerDirectory>src/test/resources/dockerDirectory</dockerDirectory>
<imageName>busybox</imageName>
<resources>
<resource>
<!-- test we handle all elements correctly -->
<targetPath>resources</targetPath>
<directory>src/test/resources/copy1</directory>
<include>**/*.xml</include>
<exclude>**/*exclude*</exclude>
</resource>
<resource>
<!-- test we handle missing elements correctly -->
<directory>src/test/resources/copy2</directory>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<configuration>
<dockerHost>http://host:2375</dockerHost>
<!-- test that dockerDirectory works correctly -->
<dockerDirectory>src/test/resources/dockerDirectory</dockerDirectory>
<imageName>busybox</imageName>
<resources>
<resource>
<!-- test we handle all elements correctly -->
<targetPath>resources</targetPath>
<directory>src/test/resources/copy1</directory>
<include>**/*.xml</include>
<include>Dockerfile</include>
<exclude>**/*exclude*</exclude>
</resource>
<resource>
<!-- test we handle missing elements correctly -->
<directory>src/test/resources/copy2</directory>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment