Commit be1c2b59 by 钟明宏

删除一些比较low的注释

parent f3430a93
......@@ -29,19 +29,20 @@
<name>Sonatype Nexus Snapshots</name>
<url>http://nexus.cqwzxt.com/repository/snapshots/</url>
</snapshotRepository>
<repository>
<id>releases</id>
<name>Nexus Release Repository</name>
<url>http://nexus.cqwzxt.com/repository/releases/</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>yunmaozj</id>
<url>http://nexus.cqwzxt.com/repository/yunmaozj/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>yunmaozj</id>
......
......@@ -203,7 +203,7 @@ public class BuildMojo extends AbstractDockerMojo {
/**
* The workdir for the image. Ignored if dockerDirectory is set
*/
@Parameter(property = "workdir")
@Parameter(property = "workDir")
private String workdir;
/**
......@@ -298,8 +298,8 @@ public class BuildMojo extends AbstractDockerMojo {
* HEALTHCHECK. It expects a element for 'options' and 'cmd'
* Added in docker 1.12 (https://docs.docker.com/engine/reference/builder/#/healthcheck).
*/
@Parameter(property = "healthcheck")
private Map<String, String> healthcheck;
@Parameter(property = "healthCheck")
private Map<String, String> healthCheck;
private PluginParameterExpressionEvaluator expressionEvaluator;
......@@ -356,7 +356,6 @@ public class BuildMojo extends AbstractDockerMojo {
@Override
public void execute() throws MojoExecutionException {
getLog().info("开始构建镜像");
try {
LOCK.lock();
super.execute();
......@@ -422,7 +421,7 @@ public class BuildMojo extends AbstractDockerMojo {
}
}
mavenProject.getProperties().put("imageName", imageName);
//获取最终复制文件的目标目录
final String destination = getDestination();
if (dockerDirectory == null) {
final List<String> copiedPaths = copyResources(destination);
......@@ -708,14 +707,14 @@ public class BuildMojo extends AbstractDockerMojo {
}
}
if (healthcheck != null && healthcheck.containsKey("cmd")) {
if (healthCheck != null && healthCheck.containsKey("cmd")) {
final StringBuffer healthcheckBuffer = new StringBuffer("HEALTHCHECK ");
if (healthcheck.containsKey("options")) {
healthcheckBuffer.append(healthcheck.get("options"));
if (healthCheck.containsKey("options")) {
healthcheckBuffer.append(healthCheck.get("options"));
healthcheckBuffer.append(" ");
}
healthcheckBuffer.append("CMD ");
healthcheckBuffer.append(healthcheck.get("cmd"));
healthcheckBuffer.append(healthCheck.get("cmd"));
commands.add(healthcheckBuffer.toString());
}
......@@ -812,13 +811,21 @@ public class BuildMojo extends AbstractDockerMojo {
return dest;
}
/**
* 复制文件
* @param destination
* @return
* @throws IOException
*/
private List<String> copyResources(String destination) throws IOException {
final List<String> allCopiedPaths = newArrayList();
for (final Resource resource : resources) {
final File source = new File(resource.getDirectory());
//包含的文件
final List<String> includes = resource.getIncludes();
//排除的文件
final List<String> excludes = resource.getExcludes();
final DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(source);
......
......@@ -51,7 +51,6 @@ public class PushMojo extends AbstractDockerMojo {
@Override
protected void execute(DockerClient docker)
throws MojoExecutionException, DockerException, InterruptedException {
getLog().info("开始推送镜像");
pushImage(docker, imageName, imageTags, getLog(), null, getRetryPushCount(),
getRetryPushTimeout(), isSkipDockerPush());
}
......
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