Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-maven-plugin re-launch other plugin #448

Closed
burtsevyg opened this issue May 17, 2016 · 1 comment
Closed

docker-maven-plugin re-launch other plugin #448

burtsevyg opened this issue May 17, 2016 · 1 comment

Comments

@burtsevyg
Copy link

Please see source pom.xml https://github.com/burtsevyg/test/blob/master/pom.xml for example

in log I see:
First time:

...
[INFO] --- maven-antrun-plugin:1.8:run (ls-command) @ docker-maven-plugin-test ---
[INFO] Executing tasks
...

Second time:

...
[INFO] >>> docker-maven-plugin:0.15.1:source (start) @ docker-maven-plugin-test >>>
[INFO]
...
[INFO] --- maven-antrun-plugin:1.8:run (ls-command) @ docker-maven-plugin-test ---
[INFO] Executing tasks
...
[INFO] <<< docker-maven-plugin:0.15.1:source (start) @ docker-maven-plugin-test <<<
@rhuss
Copy link
Collaborator

rhuss commented May 17, 2016

Yes, that's true and because of that docker:source forks the Maven lifecycle in order to create the artefacts (jars, copied resources) to include in the docker.tar

Hence it is probably not well suited to add as phase to the lifecycle where the the package phase is already called (hence it will run twice through the package phase, one because of the norma lifecycle and one for the callout by docker:source).

There is no easy solution for this if one want to guarantee that the package phase is called when running mvn docker:start directly.

Maybe we should use the same 'trick' like the maven-source-plugin, e.g. having two goals source:jar and source:jar-no-fork, one for when called directly and the other when bound to an execution.

I will look into this and probably mimic this behaviour if I cant find a more elegant solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants