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
Add a skipPom parameter, skipping a project if packaging is pom #1388
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1388 +/- ##
============================================
+ Coverage 58.23% 58.79% +0.56%
- Complexity 1955 1974 +19
============================================
Files 162 162
Lines 9014 9014
Branches 1362 1362
============================================
+ Hits 5249 5300 +51
+ Misses 3295 3229 -66
- Partials 470 485 +15
|
SonarCloud Quality Gate failed. 0 Bugs |
@@ -137,6 +137,9 @@ By default a progress meter is printed out on the console, which is omitted when | |||
| If set dont push any images even when `{plugin}:push` is called. | |||
| `docker.skip.push` | |||
|
|||
| *skipPom* | |||
| If set to `true` this plugin will skip every projects, where `project.packaging` is set to `true`. Property: `docker.skip.pom` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a typo here:
| If set to `true` this plugin will skip every projects, where `project.packaging` is set to `true`. Property: `docker.skip.pom` | |
| If set to `true` this plugin will skip every projects, where `project.packaging` is set to `pom`. Property: `docker.skip.pom` |
Signed-off-by: Laszlo Stahorszki <laszlo.stahorszki@ropi.dev>
@rolaca11: Thanks a lot for this 👍 |
@@ -137,6 +137,9 @@ By default a progress meter is printed out on the console, which is omitted when | |||
| If set dont push any images even when `{plugin}:push` is called. | |||
| `docker.skip.push` | |||
|
|||
| *skipPom* | |||
| If set to `true` this plugin will skip every projects, where `project.packaging` is set to `pom`. Property: `docker.skip.pom` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mabrarov: Thanks a lot for noticing, Could you please create a PR to fix this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is it #1448
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've merged it into master. Thanks a lot for your quick PR :-)
The usecase for this feature:
There are multiple projects which use the same docker-maven-plugin configuration. A logical way to extract that config to one place is to use the
pluginManagement
tag.However, this leaves the need to define the plugin in every project wanting to use that configuration.
A ready solution is to define the plugin in the parent pom, but than the build will fail, because the docker build goal cannot find the packaged jar archive.
Here comes this PR, which tells the docker build goal to skip if the currently built project is a pom.