Home > other >  Unable to perform the target com. Services: docker maven - plugin: 0.4.3: build exception handling:
Unable to perform the target com. Services: docker maven - plugin: 0.4.3: build exception handling:

Time:09-30

Use the docker deployment Spring Cloud project, pom. Some of the XML code:




Org. Springframework. Boot
Spring - the boot - maven - plugin


Com. Spotify
The docker - maven - plugin
0.4.3 & lt;/version>

The ${docker. Image. The prefix}/${project. ArtifactId} & lt;/imageName>
The ${project. The basedir} & lt;/dockerDirectory>


/
The ${project. Build. Directory} & lt;/directory>
The ${project. Build. FinalName}. Jar






Org, apache maven. Plugins
Maven - surefire - plugin

true





When I run the command: MVN package docker: build, it will throw an error:

[the INFO] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
[ERROR] Failed to execute goal com. Services: docker -- maven plugin: 0.4.3: build (the default) on project users - microservice: Exception caught: Java. Util. Concurrent. ExecutionException: com. 8. The docker. Client. The shaded. Javax.mail. Ws. Rs. ProcessingException: org. Apache. HTTP. Conn. HttpHostConnectException: Connect to localhost: 2375/localhost/127.0.0.1 localhost/0:0:0:0:0:0:1-0] Failed: Connection refused - & gt; [1] Help
[ERROR]
[ERROR] To see the full stack trace of the errors, re - run Maven have the -e switch.
[ERROR] Re - run Maven using the -x switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, both please read the following articles:
[ERROR] [1] Help http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

Why it will connect to localhost: 2375? Any idea, I will be appreciated!

CodePudding user response:

Please send your docker -- maven plugin version from 0.4.3 update for 1.0.0




Org. Springframework. Boot
Spring - the boot - maven - plugin


Com. Spotify
The docker - maven - plugin
1.0.0 & lt;/version>

The ${docker. Image. The prefix}/${project. ArtifactId} & lt;/imageName>
The ${project. The basedir} & lt;/dockerDirectory>


/
The ${project. Build. Directory} & lt;/directory>
The ${project. Build. FinalName}. Jar






Org, apache maven. Plugins
Maven - surefire - plugin

True





CodePudding user response:

With the docker packaged into the mirror when not connected to the 2375? Just like mysql the default port is 3306
  • Related