BAEL-5083: Rename projects to make the example simpler (#11196)

* BAEL-5083: renamed projects for better understanding

* BAEL-5083: change version from 1.0-SNAPSHOT to 1.0.0-SNAPSHOT
This commit is contained in:
Ralf Ueberfuhr 2021-09-03 17:50:16 +02:00 committed by GitHub
parent a30a491ab1
commit d3b525c046
5 changed files with 21 additions and 20 deletions

View File

@ -3,11 +3,11 @@
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">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>project-b</artifactId> <artifactId>module1</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung.maven-parent-pom-resolution</groupId>
<artifactId>project-a</artifactId> <artifactId>aggregator</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<!-- The parent pom is resolved to project a's pom.xml --> <!-- The parent pom is resolved to project a's pom.xml -->
</parent> </parent>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -3,11 +3,11 @@
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">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>project-d</artifactId> <artifactId>module3</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung.maven-parent-pom-resolution</groupId>
<artifactId>project-a</artifactId> <artifactId>aggregator</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<!-- removing relativePath won't work even if project-a is the aggregator project --> <!-- removing relativePath won't work even if project-a is the aggregator project -->
<!-- it only works in IntelliJ IDEA when project-a is registered as a Maven Project --> <!-- it only works in IntelliJ IDEA when project-a is registered as a Maven Project -->
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>

View File

@ -3,18 +3,18 @@
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">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>project-c</artifactId> <artifactId>module2</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung.maven-parent-pom-resolution</groupId>
<artifactId>project-b</artifactId> <artifactId>module1</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<relativePath>../project-b/pom.xml</relativePath> <relativePath>../module1/pom.xml</relativePath>
<!-- The parent pom is resolved to project a's pom.xml --> <!-- The parent pom is resolved to project a's pom.xml -->
</parent> </parent>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>project-d</module> <module>module3</module>
</modules> </modules>
</project> </project>

View File

@ -3,18 +3,19 @@
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">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>project-a</artifactId> <groupId>com.baeldung.maven-parent-pom-resolution</groupId>
<artifactId>aggregator</artifactId>
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>maven-parent-pom-resolution</artifactId> <artifactId>maven-parent-pom-resolution</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<!-- The parent pom is resolved to ../pom.xml --> <!-- The parent pom is resolved to ../pom.xml -->
</parent> </parent>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>project-b</module> <module>module1</module>
<module>project-c</module> <module>module2</module>
</modules> </modules>
</project> </project>

View File

@ -5,11 +5,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>maven-parent-pom-resolution</artifactId> <artifactId>maven-parent-pom-resolution</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>project-a</module> <module>aggregator</module>
</modules> </modules>
<!-- to detect the POM hierarchy, just type "mvn dependency:display-ancestors" --> <!-- to detect the POM hierarchy, just type "mvn dependency:display-ancestors" -->