-
Notifications
You must be signed in to change notification settings - Fork 575
plugin does not work if artifactId contains uppercase character. #215
Comments
Docker has a somewhat strange syntax for the allowed image name part, i.e. it must conform to the pattern So if the artifact id is part of the image name, it must not contain uppercase letters (+ the other constraints described by the pattern above). |
It is very clean for me to understand that artifactId does not meet the requirements. I am just having difficulties to understand why getting "org.apache.http.client.ClientProtocolException" exception while expecting to get "com.x.y.x.SomeStupidException("Your artifactId does not meet requirements..bla bla bla..")" Kind Regards |
You are absolutely correct (but wanted to point out, that there are still other restrictions like no more than two subsequent underscores too) Its an issue on the Docker daemon side that it simply closes the connection without any error indication. So you'd better validate on the client side, too, to get a meaningful error message. |
related to / duplicate of #206 |
Ver: spotify/docker-maven-plugin#215 Ver también: Issue #46
I also encountered the same problem. Your method solved my problem. Thank you. |
Description
plugin does not work if artifactId contains uppercase character.
How to reproduce
plugin does not work if maven project artifactId contains uppercase character.
What do you expect
It must not be a problem , if it is so it must be written in the docs !!
What happened instead
mvn clean package docker:build throw exception
INFO: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Connection reset by peer at Socket[addr=0.0.0.0/0.0.0.0,port=0,localport=0][fd=java.io.FileDescriptor@5fad5636; file=/run/docker.sock; connected=true; bound=false]
Software:
sunels@sunels:~$ docker info
Containers: 7
Running: 0
Paused: 0
Stopped: 7
Images: 37
Server Version: 1.10.3
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 45
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-34-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.726 GiB
Name: sunels
ID: 4EBW:U4UN:U4UV:KYKY:TSTU:DSEZ:ZRYH:LS6B:FWRU:6CPE:YDP7:IJWG
Username: sunels
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Full backtrace
sunels@sunels:/serkan sunel/ConsumerSharedService/consumerSharedService$ mvn clean compile package docker:build
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building consumer shared service 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Customer-shared-service ---
[INFO] Deleting /space/serkan sunel/ConsumerSharedService/consumerSharedService/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Customer-shared-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Customer-shared-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 35 source files to /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/classes
[WARNING] /space/serkan sunel/ConsumerSharedService/consumerSharedService/src/main/java/com/gk/banking/CrudUtil.java: /space/serkan sunel/ConsumerSharedService/consumerSharedService/src/main/java/com/gk/banking/CrudUtil.java uses unchecked or unsafe operations.
[WARNING] /space/serkan sunel/ConsumerSharedService/consumerSharedService/src/main/java/com/gk/banking/CrudUtil.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Customer-shared-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Customer-shared-service ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Customer-shared-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /space/serkan sunel/ConsumerSharedService/consumerSharedService/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Customer-shared-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ Customer-shared-service ---
[INFO] Surefire report directory: /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/surefire-reports
T E S T S
Running com.gk.banking.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in banking.AppTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ Customer-shared-service ---
[INFO] Building jar: /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/Customer-shared-service-0.1.0.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.3.3.RELEASE:repackage (default) @ Customer-shared-service ---
[INFO]
[INFO] --- docker-maven-plugin:0.2.3:build (default-cli) @ Customer-shared-service ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Copying /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/Customer-shared-service-0.1.0.jar -> /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/docker/Customer-shared-service-0.1.0.jar
[INFO] Copying src/main/docker/Dockerfile -> /space/serkan sunel/ConsumerSharedService/consumerSharedService/target/docker/Dockerfile
[INFO] Building image sunels/Customer-shared-service
Apr 07, 2016 9:04:48 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Connection reset by peer at Socket[addr=0.0.0.0/0.0.0.0,port=0,localport=0][fd=java.io.FileDescriptor@5fad5636; file=/run/docker.sock; connected=true; bound=false]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.355s
[INFO] Finished at: Thu Apr 07 09:04:48 EEST 2016
[INFO] Final Memory: 40M/242M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (default-cli) on project Customer-shared-service: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException: Cannot retry request with a non-repeatable request entity: Connection reset by peer at Socket[addr=0.0.0.0/0.0.0.0,port=0,localport=0][fd=java.io.FileDescriptor@5fad5636; file=/run/docker.sock; connected=true; bound=false] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with 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, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
sunels@sunels:/space/projects/ConsumerSharedService/consumerSharedService$
The text was updated successfully, but these errors were encountered: