Skip to content

Warning message for License list version #247

@aherbert

Description

@aherbert

The spdx-maven-plugin always outputs this message when using the default configuration (i.e. no license list version information is provided):

License list version does not match the pattern M.N

I traced this to the spdx-java-library by changing the error message in SpdxCreatorInformation to:

return "License list version does not match the pattern M.N: " + version;

The error is now:

License list version does not match the pattern M.N: 3.24.0

So the bug is in the use of matches instead of find as it is trying to match the partial regex "^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+" to the entire char sequence here:

SpdxConstants.LICENSE_LIST_VERSION_PATTERN.matcher(version).matches()

When changed to:

SpdxConstants.LICENSE_LIST_VERSION_PATTERN.matcher(version).find()

I see no warning output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions