docker-maven-plugin
docker-maven-plugin copied to clipboard
Fix #38 Images that should be pushed but not kept are now deleted
There is no good way to share information between MOJO's so I've used a maven property to pass over a comma separated list of image IDs.
Hi Mike,
Thanks for the PR. Actually, you can share state between Mojos, via the PluginContext. See AbstractDockerMojo#obtainListFromPluginContext()
For the rest, this looks great. :)
Close, it's Mark :)
DOH! I've been looking at this the wrong way. I didn't push stuff up into the AbstractDockerMojo because I didn't want to cause a conflict between List<ImageBuildConfiguration> images in BuildImageMojo and List<ImageTagConfiguration> images in TagImageMojo.
What I should have done is just define a list in AbstractDockerMojo instead of loading the data I care about sharing into a property.
I'll refactor it on the train on the way home tonight.
All done now, let me know if there's anything else outstanding.