-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Affected version
3.6.0
Bug description
When generating a NOTICE
using ApacheNoticeResourceTransformer
, the project name is not injected (or more likely, resolved) as expected, e.g. the output is:
// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for
// ------------------------------------------------------------------
Not, something like this as you' might expect:
https://github.com/apache/amoro/blob/0e34e89dcfc8b5c5b5da285786004965d5b70bc6/NOTICE-binary#L1-L4
Line 100 in 256eab8
entries.add(preamble1 + projectName + preamble2); |
Reproducer:
Simple pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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>
<groupId>com.me</groupId>
<version>0.0.1</version>
<artifactId>maven-shade-notice-reproducer</artifactId>
<name>Maven Shade Notice Reproducer</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
</dependency>
</dependencies>
</project>
Windows command to build and print the contents of the NOTICE
:
mvn clean package && jar -xf target\maven-shade-notice-reproducer-0.0.1.jar && type META-INF\NOTICE