From f19d76fac21f3a0b3d51cc7b7e73451b732a9096 Mon Sep 17 00:00:00 2001 From: Ralf Ueberfuhr <40685729+ueberfuhr@users.noreply.github.com> Date: Wed, 1 Sep 2021 04:22:43 +0200 Subject: [PATCH] BAEL-5083: add Maven parent POM resolution samples (#11182) Co-authored-by: Ralf Ueberfuhr --- .../maven-parent-pom-resolution/README.md | 3 ++ .../maven-parent-pom-resolution/pom.xml | 28 +++++++++++++++++++ .../project-a/pom.xml | 20 +++++++++++++ .../project-a/project-b/pom.xml | 15 ++++++++++ .../project-a/project-c/pom.xml | 20 +++++++++++++ .../project-a/project-c/project-d/pom.xml | 17 +++++++++++ maven-modules/pom.xml | 1 + 7 files changed, 104 insertions(+) create mode 100644 maven-modules/maven-parent-pom-resolution/README.md create mode 100644 maven-modules/maven-parent-pom-resolution/pom.xml create mode 100644 maven-modules/maven-parent-pom-resolution/project-a/pom.xml create mode 100644 maven-modules/maven-parent-pom-resolution/project-a/project-b/pom.xml create mode 100644 maven-modules/maven-parent-pom-resolution/project-a/project-c/pom.xml create mode 100644 maven-modules/maven-parent-pom-resolution/project-a/project-c/project-d/pom.xml diff --git a/maven-modules/maven-parent-pom-resolution/README.md b/maven-modules/maven-parent-pom-resolution/README.md new file mode 100644 index 0000000000..6f72b5e70b --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Understanding the "relativePath" Tag - Maven Parent POM Resolution At A Glance](https://www.baeldung.com/maven-relativepath) diff --git a/maven-modules/maven-parent-pom-resolution/pom.xml b/maven-modules/maven-parent-pom-resolution/pom.xml new file mode 100644 index 0000000000..62e3946723 --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + com.baeldung + maven-parent-pom-resolution + 1.0-SNAPSHOT + pom + + + project-a + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + + + + diff --git a/maven-modules/maven-parent-pom-resolution/project-a/pom.xml b/maven-modules/maven-parent-pom-resolution/project-a/pom.xml new file mode 100644 index 0000000000..2d53a36d84 --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/project-a/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + project-a + + com.baeldung + maven-parent-pom-resolution + 1.0-SNAPSHOT + + + pom + + + project-b + project-c + + + diff --git a/maven-modules/maven-parent-pom-resolution/project-a/project-b/pom.xml b/maven-modules/maven-parent-pom-resolution/project-a/project-b/pom.xml new file mode 100644 index 0000000000..e3f5239efe --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/project-a/project-b/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + project-b + + com.baeldung + project-a + 1.0-SNAPSHOT + + + pom + + diff --git a/maven-modules/maven-parent-pom-resolution/project-a/project-c/pom.xml b/maven-modules/maven-parent-pom-resolution/project-a/project-c/pom.xml new file mode 100644 index 0000000000..3c7f70ae20 --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/project-a/project-c/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + project-c + + com.baeldung + project-b + 1.0-SNAPSHOT + ../project-b/pom.xml + + + pom + + + project-d + + + diff --git a/maven-modules/maven-parent-pom-resolution/project-a/project-c/project-d/pom.xml b/maven-modules/maven-parent-pom-resolution/project-a/project-c/project-d/pom.xml new file mode 100644 index 0000000000..973e44eb1f --- /dev/null +++ b/maven-modules/maven-parent-pom-resolution/project-a/project-c/project-d/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + project-d + + com.baeldung + project-a + 1.0-SNAPSHOT + + + ../../pom.xml + + pom + + diff --git a/maven-modules/pom.xml b/maven-modules/pom.xml index a0c45234d2..fe3bbd2653 100644 --- a/maven-modules/pom.xml +++ b/maven-modules/pom.xml @@ -36,6 +36,7 @@ host-maven-repo-example plugin-management maven-surefire-plugin + maven-parent-pom-resolution