You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Enrico Olivelli (JIRA)" <ji...@apache.org> on 2018/12/27 16:52:00 UTC

[jira] [Resolved] (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:all-tabpanel ]

Enrico Olivelli resolved MASSEMBLY-762.
---------------------------------------
    Resolution: Fixed

> 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
>            Priority: Major
>             Fix For: 3.1.1
>
>
> 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
(v7.6.3#76005)