michael-o, I think this is still a valid bug. Here is a test case to reproduce it:
This is how my pom.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http:
xmlns:xsi="http:
xsi:schemaLocation="http:>
<modelVersion>4.0.0</modelVersion>
<groupId>com.vlkan</groupId>
<artifactId>maven-shade-plugin-pom-bug</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.2.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>net.java.dev.jna:jna</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Here, since I am including net.java.dev.jna:jna within the final artifact, I would expect it to be removed from the META-INF/maven/com.vlkan/maven-shade-plugin-pom-bug/pom.xml file. But apparently, it is not:
$ mvn package
$ unzip -p target/maven-shade-plugin-pom-bug-1.0-SNAPSHOT.jar META-INF/maven/com.vlkan/maven-shade-plugin-pom-bug/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http:
xmlns:xsi="http:
xsi:schemaLocation="http:>
<modelVersion>4.0.0</modelVersion>
<groupId>com.vlkan</groupId>
<artifactId>maven-shade-plugin-pom-bug</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.2.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>net.java.dev.jna:jna</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Per see, net.java.dev.jna:jna still appears as a dependency, which actually is not any more. It should have been removed from the dependencies of the final artifact.
michael-o, can we re-open this issue? (I suppose I am lacking the sufficient rights to do so.)
Would creating a ResourceTransformer be the best approach?