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

Command Line flag to alter the list of included files to check #536

Open
mathieu opened this issue Apr 18, 2023 · 7 comments
Open

Command Line flag to alter the list of included files to check #536

mathieu opened this issue Apr 18, 2023 · 7 comments
Assignees
Labels
in:core MLP core module is:feature New feature todo Accepted items from the backlog which can be worked on

Comments

@mathieu
Copy link
Contributor

mathieu commented Apr 18, 2023

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
@mathieu mathieu added the is:feature New feature label Apr 18, 2023
@hazendaz
Copy link
Collaborator

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"

@mathieu
Copy link
Contributor Author

mathieu commented Apr 25, 2023

It doesn't work, includes from the cli do not get used by the plugin, either with license.includes or licenseSets.licenseSet.includes

@stale
Copy link

stale bot commented Jun 24, 2023

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.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Jun 24, 2023
@mathieu
Copy link
Contributor Author

mathieu commented Jun 24, 2023

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...

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Jun 24, 2023
@stale
Copy link

stale bot commented Aug 23, 2023

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.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Aug 23, 2023
@mathieu
Copy link
Contributor Author

mathieu commented Aug 24, 2023

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...

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Aug 24, 2023
@stale
Copy link

stale bot commented Oct 24, 2023

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.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Oct 24, 2023
@stale stale bot closed this as completed Oct 31, 2023
mathieu added a commit to mathieu/license-maven-plugin that referenced this issue Jan 7, 2025
…iles

usage: mvn license:check -Dlicense.filesToCheck="src/main/org/acme/MyClass.java,src/main/org/acme/MyEnum.java"
@mathieucarbou mathieucarbou linked a pull request Jan 7, 2025 that will close this issue
@mathieucarbou mathieucarbou reopened this Jan 7, 2025
@mathieucarbou mathieucarbou removed the stale Inactive items that will be automatically closed if not resurrected label Jan 7, 2025
@mathieucarbou mathieucarbou added in:core MLP core module todo Accepted items from the backlog which can be worked on labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:core MLP core module is:feature New feature todo Accepted items from the backlog which can be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants