Command Line flag to alter the list of included files to check
mathieu opened this issue · comments
Describe the feature
Using the plugin to check only a set of files (via precommit). It works fine with the legacy way of declaring include files.
mvn license:check -Dlicense.includes=src/main/myfile.java
But if I move my configuration inside the proposed <LicenseSets><LicenseSet></LicenseSet></LicenseSets>
section
using the LicenseSet.includes
proposed alternative doesn't work and all files are checked.
mvn license:check -DLicenseSet.includes=src/main/myfile.java
Any alternative you've considered ?
Keep the legacy configuration but it has deprecation warnings
[INFO] --- license:4.2:check (default-cli) @ runtime-parent ---
[WARNING] Parameter 'legacyConfigExcludes' (user property 'license.excludes') is deprecated: use LicenseSet.excludes
[WARNING] Parameter 'legacyConfigIncludes' (user property 'license.includes') is deprecated: use LicenseSet.includes
[WARNING] Parameter 'legacyConfigInlineHeader' (user property 'license.inlineHeader') is deprecated: use LicenseSet.inlineHeader
have you tried the following?
mvn license:check -DlicenseSets.licenseSet.includes=src/main/myfile.java
and if done from windows, quoted instead...
mvn license:check -D"licenseSets.licenseSet.includes=src/main/myfile.java"
It doesn't work, includes from the cli do not get used by the plugin, either with license.includes
or licenseSets.licenseSet.includes
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
An alternative proposal could be to have a top-level variable that would list the files to consider instead of the whole content of the current folder...
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I will try to make a PR proposing to have a top-level variable that would list the files to consider instead of the whole content of the current folder...
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.