diff --git a/maven-modules/plugin-management/pom.xml b/maven-modules/plugin-management/pom.xml new file mode 100644 index 0000000000..4a999a1aae --- /dev/null +++ b/maven-modules/plugin-management/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + 0.0.1-SNAPSHOT + + maven-modules + com.baeldung + 0.0.1-SNAPSHOT + + plugin-management + pom + + + submodule-1 + submodule-2 + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${maven.bulid.helper.plugin} + + + add-resource + generate-resources + + add-resource + + + + + src/resources + json + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.plugin} + + 1.8 + 1.8 + + + + + + + + 3.8.1 + 3.2.0 + + + \ No newline at end of file diff --git a/maven-modules/plugin-management/submodule-1/pom.xml b/maven-modules/plugin-management/submodule-1/pom.xml new file mode 100644 index 0000000000..915e4dfe60 --- /dev/null +++ b/maven-modules/plugin-management/submodule-1/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + submodule-1 + + + plugin-management + com.baeldung + 0.0.1-SNAPSHOT + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + + + diff --git a/maven-modules/plugin-management/submodule-1/src/resources/include.json b/maven-modules/plugin-management/submodule-1/src/resources/include.json new file mode 100644 index 0000000000..d5df76e7e0 --- /dev/null +++ b/maven-modules/plugin-management/submodule-1/src/resources/include.json @@ -0,0 +1,3 @@ +{ + "key": "value" +} \ No newline at end of file diff --git a/maven-modules/plugin-management/submodule-1/src/test/java/com/baeldung/CopiesAdditionalResourcesUnitTest.java b/maven-modules/plugin-management/submodule-1/src/test/java/com/baeldung/CopiesAdditionalResourcesUnitTest.java new file mode 100644 index 0000000000..ab6b781790 --- /dev/null +++ b/maven-modules/plugin-management/submodule-1/src/test/java/com/baeldung/CopiesAdditionalResourcesUnitTest.java @@ -0,0 +1,19 @@ +package com.baeldung; + +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.net.URL; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CopiesAdditionalResourcesUnitTest { + + @Test + void givenAdditionalResource_whenCopyingFromSourceToDestination_thenShouldBeInDestination() { + URL resource = getClass().getClassLoader().getResource("json/include.json"); + File destinationFile = new File(resource.getFile()); + + assertTrue(destinationFile.exists()); + } +} diff --git a/maven-modules/plugin-management/submodule-2/pom.xml b/maven-modules/plugin-management/submodule-2/pom.xml new file mode 100644 index 0000000000..327bdcebb1 --- /dev/null +++ b/maven-modules/plugin-management/submodule-2/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + submodule-2 + + + plugin-management + com.baeldung + 0.0.1-SNAPSHOT + + + diff --git a/maven-modules/pom.xml b/maven-modules/pom.xml index 7e8bf20553..0700c6e637 100644 --- a/maven-modules/pom.xml +++ b/maven-modules/pom.xml @@ -33,6 +33,7 @@ versions-maven-plugin maven-printing-plugins maven-builder-plugin + plugin-management