license-maven-plugin icon indicating copy to clipboard operation
license-maven-plugin copied to clipboard

Transitive dependencies of WAR artifacts file not picked up by add-third-party goal

Open stefanroeck opened this issue 3 years ago • 2 comments

Steps:

  1. Add a dependency to a war artifact that has transitive depdendencies, e.g.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>simplewar</artifactId>
    <packaging>war</packaging>

    <dependencies>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>
    </dependencies>
</project>
  1. Run add-third-party goal

Expected

  • License for commons-lang detected

Actual

  • No license found

If the packaging of simplewar is changed from war to jar, the license is picked up.

stefanroeck avatar Dec 03 '21 09:12 stefanroeck

The same applies for artifacts with packaging type ear.

stefanroeck avatar Dec 20 '21 10:12 stefanroeck

This also applies to type bundle which is just a jar with extra (OSGi) metadata in META-INF/.

RangerRick avatar Feb 24 '22 18:02 RangerRick