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

licenseName can not be null, nor empty #606

Closed
vitalijr2 opened this issue Nov 14, 2024 · 0 comments · Fixed by #607
Closed

licenseName can not be null, nor empty #606

vitalijr2 opened this issue Nov 14, 2024 · 0 comments · Fixed by #607
Labels

Comments

@vitalijr2
Copy link
Contributor

I run the plugin on my project, there no any configuration for this plugin.

The POM contains inceptionYear and license info like this:

...
  <groupId>io.github.john.supergroup</groupId>
  <inceptionYear>2024</inceptionYear>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <modelVersion>4.0.0</modelVersion>
...

The goal check-file-header has three required parameters: inceptionYear, organizationName and projectName.

I use next command line:

./mvnw license:check-file-header -Dlicense.inceptionYear=2024 -Dlicense.organizationName=John\ Doe -Dlicense.projectName=some-project.

It fails with message:

[ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.4.0:check-file-header (default-cli) on project some-project: could not init goal CheckFileHeaderMojo for reason : licenseName can not be null, nor empty -> [Help 1]

Looks like licenseName is a required parameter too and should be set manually in the configuration or CLI parameters.

Because when I run

./mvnw license:check-file-header -Dlicense.licenseName=apache_v2 -Dlicense.inceptionYear=2024 -Dlicense.organizationName=John\ Doe -Dlicense.projectName=some-project

it finish successfully.

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

Successfully merging a pull request may close this issue.

2 participants