You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tomer Cohen (JIRA)" <ji...@apache.org> on 2016/02/18 15:36:18 UTC
[jira] [Commented] (MASSEMBLY-762) Assembly plugin doesn't exclude
transitive dependencies when excluded by wildcards in dependencies section
[ https://issues.apache.org/jira/browse/MASSEMBLY-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152392#comment-15152392 ]
Tomer Cohen commented on MASSEMBLY-762:
---------------------------------------
Hi Team,
Will a fix for this be included in the next version of the plugin?
The problem is when there are many exclusions for a certain artifact, the pom can become quite verbose, and a wildcard is a much neater solution.
Thanks! :)
> Assembly plugin doesn't exclude transitive dependencies when excluded by wildcards in dependencies section
> ----------------------------------------------------------------------------------------------------------
>
> Key: MASSEMBLY-762
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-762
> Project: Maven Assembly Plugin
> Issue Type: Bug
> Components: dependencySet
> Affects Versions: 2.5.3
> Reporter: Denis Goihburg
>
> On goal assembly:single with pom file:
> {code:xml}
> <?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>
> <groupId>MyTests</groupId>
> <artifactId>Tests</artifactId>
> <packaging>pom</packaging>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-core</artifactId>
> <version>4.1.0.RELEASE</version>
> <exclusions>
> <exclusion>
> <groupId>*</groupId>
> <artifactId>*</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.5.3</version>
> <configuration>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> {code}
> transitive dependency commons-logging appears in resulting jar.
> When wildcard is replaced with specific dependency:
> {code:xml}
> <dependencies>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-core</artifactId>
> <version>4.1.0.RELEASE</version>
> <exclusions>
> <exclusion>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
> </project>
> {code}
> the plugin works as expected and doesn't add this dependency.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)