Merge pull request #9742 from maciejglowka/BAEL-3347_fix

BAEL-3347: moved version collision submodule from maven-all to maven-…
This commit is contained in:
Loredana Crusoveanu 2020-07-22 10:29:58 +03:00 committed by GitHub
commit 4e3708f1f8
7 changed files with 37 additions and 102 deletions

View File

@ -1,54 +0,0 @@
<?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">
<parent>
<artifactId>maven-all</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>version-collision</artifactId>
<packaging>pom</packaging>
<modules>
<module>project-a</module>
<module>project-b</module>
<module>project-collision</module>
</modules>
<!--comment section below to provoke version collision in project-collision module-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>
</dependencies>
</dependencyManagement>
<!-- uncomment section below to ban the use of transitive dependencies -->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-enforcer-plugin</artifactId>-->
<!-- <version>3.0.0-M3</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>enforce-banned-dependencies</id>-->
<!-- <goals>-->
<!-- <goal>enforce</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <rules>-->
<!-- <banTransitiveDependencies/>-->
<!-- </rules>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project>

View File

@ -1,21 +0,0 @@
<?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">
<parent>
<artifactId>version-collision</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>child-module</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.3.9</version>
</dependency>
</dependencies>
</project>

View File

@ -3,7 +3,7 @@
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">
<parent>
<artifactId>maven-all</artifactId>
<artifactId>maven-modules</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
@ -11,34 +11,44 @@
<artifactId>version-collision</artifactId>
<packaging>pom</packaging>
<modules>
<module>child-module</module>
<module>project-a</module>
<module>project-b</module>
<module>project-collision</module>
</modules>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.7</version>
<!--uncomment section below to exclude commons-lang3 artifact to prevent version collision-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-lang3</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
</dependency>
</dependencies>
<!--comment section below to provoke version collision in project-collision module-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>
</dependencies>
</dependencyManagement>
<!--uncomment section below to use dependencyManagement to prevent version collision-->
<!-- <dependencyManagement>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-lang3</artifactId>-->
<!-- <version>3.4</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- </dependencyManagement>-->
<!-- uncomment section below to ban the use of transitive dependencies -->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-enforcer-plugin</artifactId>-->
<!-- <version>3.0.0-M3</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>enforce-banned-dependencies</id>-->
<!-- <goals>-->
<!-- <goal>enforce</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <rules>-->
<!-- <banTransitiveDependencies/>-->
<!-- </rules>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project>