Skip to content

MIT license not detected in Maven POM #4262

Description

@pombredanne

Description

In this pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.7.1</version>
    <licenses>
        <license>
            <name>Apache-2.0</name>
        </license>
        <license>
            <name>MIT</name>
        </license>
    </licenses>
</project>

The extracted license is:

extracted_license_statement: |
    - name: Apache-2.0
    - name: MIT

And the detections are:

declared_license_expression: apache-2.0
declared_license_expression_spdx: Apache-2.0
license_detections:
    -   license_expression: apache-2.0
        license_expression_spdx: Apache-2.0
        matches:
            -   license_expression: apache-2.0
                license_expression_spdx: Apache-2.0
                from_file: pom.xml
                start_line: 1
                end_line: 1
                matcher: 2-aho
                score: '100.0'
                matched_length: 3
                match_coverage: '100.0'
                rule_relevance: 100
                rule_identifier: spdx_license_id_apache-2.0_for_apache-2.0.RULE
                rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_apache-2.0_for_apache-2.0.RULE
                matched_text: '- name: Apache-2.0'

... missing entirely the MIT license

How To Reproduce

Save a file as pom.xml with content above, then run scancode --yaml - --package pom.xml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions