maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [maven] adamretter commented on pull request #357: Add wildcard option for direct goal execution id from command line
Date Tue, 02 Jun 2020 10:46:49 GMT

adamretter commented on pull request #357:

   @rfscholte Okay, so this is my use-case...
   I am using the [license-maven-plugin](
which allows me to check for and/or format license headers on source-code files. However,
I think my use case is equally applicable for any other plugin.
   Our projects's source code uses a couple of different licenses. The license plugin enables
you to configure it for a single license. Therefore, we need one execution of the plugin's
`check` goal per-license that we want to enforce, and we want that bound to the `verify` lifecycle
   Therefore we have a configuration which looks something like this:
           <!-- Check that the LGPL 2.1 license is present and correct -->
           <!-- Check that the DBXML license is present and correct (only on BTree files)
   During development and testing we often want to run `mvn license:check` or even `mvn license:format`
to ensure that our source code has the correct licenses. Unfortunately that only run's for
the *executionId* `default-cli` which equates to  `check-lgpl-headers`, which means that not
all source files are correctly checked for the appropriate license headers.
   Now I could indeed run `mvn license:check@check-lgpl-headers && mvn license:check@check-dbxml-headers`.
But that's not very nice... and also there are actually more than two executions involved,
I only showed the two to keep my example short ;-)
   Of course, we could just be run `mvn verify`, but we have many other plugins also bound
to that lifecycle, and some of them are very slow and intensive. Also that would only execute
the `check` goals, it doesn't help us with the `format` goals.
   With my PR, running `mvn license:check@*` does correctly run each. It in fact creates one
`MojoExecution` per executionId, and for each it merges the parent config with the just the
config for that specific execution, so I don't think we have problems with inheritance. 
   Hope that makes sense? Please let me know if I need to do a better job at explaining it...

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message