Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Maven does not respect exclusion

$
0
0
Hi, I have the following pom.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/maven-v4_0_0.xsd">

<!-- in order to copy the dependencies, run: -->
<!-- mvn clean dependency:copy-dependencies -->
<modelVersion>4.0.0</modelVersion>

<groupId>com.proonto</groupId>
<artifactId>platform-common</artifactId>
<version>1.0</version>
<name>Proonto platform - common</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>1.1.4.RELEASE</version>
<exclusions>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.6.1.RELEASE</version>
<exclusions>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</exclusion>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.3.2.RELEASE</version>
* <exclusions>*
* <exclusion>*
* <!-- We already import it in a project that this project depends on -->*
* <groupId>org.springframework</groupId>*
* <artifactId>spring-aop</artifactId>*
* </exclusion>*
* <exclusion>*
* <!-- We already import it in a project that this project depends on -->*
* <groupId>aopalliance</groupId>*
* <artifactId>aopalliance</artifactId>*
* </exclusion>*
* </exclusions>*
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.5.Final</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.3.RELEASE</version>
<exclusions>
<exclusion>
<!-- We already import it in a project that this project depends on -->
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>./WebContent/WEB-INF/lib</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>

</project>

When i run: mvn -X clean dependency:copy-dependencies
maven brings the aopalliance and spring-aop jars, though i specifically
exclude it.
I bolded the section that is being ignored.
Thanks Yuval

Viewing all articles
Browse latest Browse all 5648

Trending Articles