BAEL-3347: moved version collision submodule from maven-all to maven-modules

This commit is contained in:
Maciej Glowka 2020-07-21 20:46:44 +02:00
parent de2ad1bc40
commit 38ccd9faaf
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" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>maven-all</artifactId> <artifactId>maven-modules</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
@ -11,34 +11,44 @@
<artifactId>version-collision</artifactId> <artifactId>version-collision</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>child-module</module> <module>project-a</module>
<module>project-b</module>
<module>project-collision</module>
</modules> </modules>
<dependencies> <!--comment section below to provoke version collision in project-collision module-->
<dependency> <dependencyManagement>
<groupId>org.apache.commons</groupId> <dependencies>
<artifactId>commons-configuration2</artifactId> <dependency>
<version>2.7</version> <groupId>com.google.guava</groupId>
<!--uncomment section below to exclude commons-lang3 artifact to prevent version collision--> <artifactId>guava</artifactId>
<!-- <exclusions>--> <version>29.0-jre</version>
<!-- <exclusion>--> </dependency>
<!-- <groupId>org.apache.commons</groupId>--> </dependencies>
<!-- <artifactId>commons-lang3</artifactId>--> </dependencyManagement>
<!-- </exclusion>-->
<!-- </exclusions>-->
</dependency>
</dependencies>
<!--uncomment section below to use dependencyManagement to prevent version collision--> <!-- uncomment section below to ban the use of transitive dependencies -->
<!-- <dependencyManagement>--> <!-- <build>-->
<!-- <dependencies>--> <!-- <plugins>-->
<!-- <dependency>--> <!-- <plugin>-->
<!-- <groupId>org.apache.commons</groupId>--> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>commons-lang3</artifactId>--> <!-- <artifactId>maven-enforcer-plugin</artifactId>-->
<!-- <version>3.4</version>--> <!-- <version>3.0.0-M3</version>-->
<!-- </dependency>--> <!-- <executions>-->
<!-- </dependencies>--> <!-- <execution>-->
<!-- </dependencyManagement>--> <!-- <id>enforce-banned-dependencies</id>-->
<!-- <goals>-->
<!-- <goal>enforce</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <rules>-->
<!-- <banTransitiveDependencies/>-->
<!-- </rules>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project> </project>