spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.67k stars 575 forks source link

Generate the destination name based on the mojo execution id #295

Closed ankon closed 6 years ago

ankon commented 7 years ago

Fixes #293

-- This passes unit- and integration tests for me, with this contained afterwards in the it directory:

$ find target/it/multiple-executions/target/
target/it/multiple-executions/target/
target/it/multiple-executions/target/test-classes
target/it/multiple-executions/target/test-classes/image_info.json
target/it/multiple-executions/target/docker-build-1
target/it/multiple-executions/target/docker-build-1/build-1
target/it/multiple-executions/target/docker-build-1/Dockerfile
target/it/multiple-executions/target/docker-build-2
target/it/multiple-executions/target/docker-build-2/build-2
target/it/multiple-executions/target/docker-build-2/Dockerfile
davidxia commented 6 years ago

@ankon I reverted the commit because I noticed an integration test was failing after merging this.

mvn clean verify

...

[INFO] Building: multiple-executions/pom.xml
[INFO] [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] [INFO] -------------< com.spotify.docker.it:multiple-executions >--------------
[INFO] [INFO] Building multiple-executions 1.0-SNAPSHOT
[INFO] [INFO] --------------------------------[ pom ]---------------------------------
[INFO] [INFO]
[INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ multiple-executions ---
[INFO] [INFO]
[INFO] [INFO] --- docker-maven-plugin:1.1.2-SNAPSHOT:build (build-1) @ multiple-executions ---
[INFO] [INFO] Using Google application default credentials
[INFO] [INFO] loaded credentials for user account with clientId=32555940559.apps.googleusercontent.com
[INFO] [INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier, ContainerRegistryAuthSupplier]
[INFO] [INFO] Project packaging is pom
[INFO] [INFO] Skipping docker build
[INFO] [INFO]
[INFO] [INFO] --- docker-maven-plugin:1.1.2-SNAPSHOT:build (build-2) @ multiple-executions ---
[INFO] [INFO] Using Google application default credentials
[INFO] [INFO] loaded credentials for user account with clientId=32555940559.apps.googleusercontent.com
[INFO] [INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier, ContainerRegistryAuthSupplier]
[INFO] [INFO] Project packaging is pom
[INFO] [INFO] Skipping docker build
[INFO] [INFO]
[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-files-exist) @ multiple-executions ---
[INFO] [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireFilesExist failed with message:
[INFO] Some required files are missing:
[INFO] /Users/david/src/docker-maven-plugin/target/it/multiple-executions/target/docker-build-1/build-1
[INFO] /Users/david/src/docker-maven-plugin/target/it/multiple-executions/target/docker-build-2/build-2
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 8.058 s
[INFO] [INFO] Finished at: 2018-05-28T11:24:02-04:00
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-files-exist) on project multiple-executions: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[INFO] [ERROR]
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ..FAILED (11.7 s)
[INFO]   The build exited with code 1. See /Users/david/src/docker-maven-plugin/target/it/multiple-executions/build.log for details.
[INFO]
[INFO] >>> findbugs-maven-plugin:3.0.0:check (default) > :findbugs @ docker-maven-plugin >>>
[INFO]
[INFO] --- findbugs-maven-plugin:3.0.0:findbugs (findbugs) @ docker-maven-plugin ---
[INFO] Fork Value is true
[INFO] Done FindBugs Analysis....
[INFO]
[INFO] <<< findbugs-maven-plugin:3.0.0:check (default) < :findbugs @ docker-maven-plugin <<<
[INFO]
[INFO]
[INFO] --- findbugs-maven-plugin:3.0.0:check (default) @ docker-maven-plugin ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO]
[INFO] --- maven-invoker-plugin:1.7:verify (integration-test) @ docker-maven-plugin ---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 6, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  multiple-executions/pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:58 min
[INFO] Finished at: 2018-05-28T11:24:36-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:1.7:verify (integration-test) on project docker-maven-plugin: 1 build failed. See console output above for details. -> [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/MojoFailureException

Any idea why?

ankon commented 6 years ago

Not from the top of my head -- but then again the PR is already half a year old.

I'll try to test this when I have some available time, but debugging help would be appreciated of course :)

ankon commented 5 years ago

We're no longer using this plugin (and are rapidly moving away from Java/Maven), so I won't be able to work on what is potentially going on here.