Denis Goihburg created MASSEMBLY-762: ----------------------------------------
Summary: Assembly plugin doesn't exclude transitive dependencies when excluded by wildcards in dependencies section Key: MASSEMBLY-762 URL: https://jira.codehaus.org/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.1.6#6162)