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

Bump license-maven-plugin to 4.1 (from 1.9.0) #549

Closed
brenuart opened this issue Jul 6, 2021 · 0 comments · Fixed by #550
Closed

Bump license-maven-plugin to 4.1 (from 1.9.0) #549

brenuart opened this issue Jul 6, 2021 · 0 comments · Fixed by #550
Milestone

Comments

@brenuart
Copy link
Collaborator

brenuart commented Jul 6, 2021

The project is currently using com.mycila.maven-license-plugin:maven-license-plugin:1.9.0 which is a pretty old version of the plugin. The plugin is now at version 4.1 and with a different GAV. The correct GAV is now:

   <groupId>com.mycila</groupId>
   <artifactId>license-maven-plugin</artifactId>
   <version>4.1</version>

The plugin configuration should also be added to the section of the POM so it also applies when the plugin is invoked from the command line. This would allow to check and/or format the source files without requiring a "full" build as follows:

mvn license:check
mvn license:format

IMHO the build should only verify if a valid license is present on source files and fail if not. In other words, the build should invoke the "check" goal instead of "format" as it is for the moment. When it fails, the user can update the files by invoking the plugin on the command line as follows:

mvn license:format

(same behaviour as with checkstyle for instance, except checkstyle doesn't provide a goal to "fix" issues automatically)

brenuart added a commit to brenuart/logstash-logback-encoder that referenced this issue Jul 6, 2021
Update POM to use the latest version of the Mycila license plugin (and correct GAV).
Move plugin configuration inside the <pluginManagement> section so the plugin can be manually invoked from the command line. Particularly handy to fix header issues automatically…
Change the build process to “check” the files only and fail the build if not valid.

Related issue: logfellow#549
brenuart added a commit to brenuart/logstash-logback-encoder that referenced this issue Jul 6, 2021
- Update POM to use the latest version of the Mycila license plugin (and correct GAV).
- Move plugin configuration inside the <pluginManagement> section so the plugin can be manually invoked from the command line. Particularly handy to fix header issues automatically…
- Change the build process to “check” the files only and fail the build if not valid.
- Remove the custom lifecycle-mapping: latest versions of the plugin have support for M2E

Related issue: logfellow#549
brenuart added a commit to brenuart/logstash-logback-encoder that referenced this issue Jul 6, 2021
- Update POM to use the latest version of the Mycila license plugin (and correct GAV).
- Move plugin configuration inside the <pluginManagement> section so the plugin can be manually invoked from the command line. Particularly handy to fix header issues automatically…
- Change the build process to “check” the files only and fail the build if not valid.
- Remove the custom lifecycle-mapping: latest versions of the plugin have support for M2E

Related issue: logfellow#549
@philsttr philsttr linked a pull request Jul 7, 2021 that will close this issue
@philsttr philsttr added this to the 7.0 milestone Jul 7, 2021
philsttr pushed a commit that referenced this issue Jul 7, 2021
* Update to license-maven-plugin:4.1

- Update POM to use the latest version of the Mycila license plugin (and correct GAV).
- Move plugin configuration inside the <pluginManagement> section so the plugin can be manually invoked from the command line. Particularly handy to fix header issues automatically…
- Change the build process to “check” the files only and fail the build if not valid.
- Remove the custom lifecycle-mapping: latest versions of the plugin have support for M2E
- Change comment style from JAVADOC to SLASHSTAR
- Add copyright as first line
- Update test case with a different expected hash caused by the additional lines in the license header

Related issue: #549
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants