From 027403bb18c2ca42eb0645b76806bad1aaf386c2 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 20 Nov 2024 22:35:41 +0100 Subject: [PATCH 1/2] POC reorganizing ITs --- its/core-it-suite/pom.xml | 6 ++++++ .../test/java/org/apache/maven/it/TestSuiteOrdering.java | 1 + .../it8005}/MavenITmng8005IdeWorkspaceReaderUsedTest.java | 6 ++++-- .../maven/it/it8xxx/it8005/resources}/.mvn/extensions.xml | 0 .../it/it8xxx/it8005/resources}/extension/.mvn/.gitkeep | 0 .../maven/it/it8xxx/it8005/resources}/extension/pom.xml | 0 .../org/apache/maven/its/extensions/IdeWorkspaceReader.java | 0 .../src/main/resources/META-INF/maven/extension.xml | 0 .../org/apache/maven/it/it8xxx/it8005/resources}/pom.xml | 0 9 files changed, 11 insertions(+), 2 deletions(-) rename its/core-it-suite/src/test/java/org/apache/maven/it/{ => it8xxx/it8005}/MavenITmng8005IdeWorkspaceReaderUsedTest.java (91%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/.mvn/extensions.xml (100%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/extension/.mvn/.gitkeep (100%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/extension/pom.xml (100%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/extension/src/main/java/org/apache/maven/its/extensions/IdeWorkspaceReader.java (100%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/extension/src/main/resources/META-INF/maven/extension.xml (100%) rename its/core-it-suite/src/test/{resources/mng-8005 => java/org/apache/maven/it/it8xxx/it8005/resources}/pom.xml (100%) diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index 361a2d299fcb..3a08dbde2ef4 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -475,6 +475,12 @@ under the License. src/test/resources + + src/test/java + + **/*.java + + true src/test/resources-filtered diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 7aebc1825023..08e036115695 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; +import org.apache.maven.it.it8xxx.it8005.MavenITmng8005IdeWorkspaceReaderUsedTest; import org.junit.jupiter.api.ClassDescriptor; import org.junit.jupiter.api.ClassOrderer; import org.junit.jupiter.api.ClassOrdererContext; diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8005IdeWorkspaceReaderUsedTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/MavenITmng8005IdeWorkspaceReaderUsedTest.java similarity index 91% rename from its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8005IdeWorkspaceReaderUsedTest.java rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/MavenITmng8005IdeWorkspaceReaderUsedTest.java index 27e863684cee..6eb40dafb5ed 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8005IdeWorkspaceReaderUsedTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/MavenITmng8005IdeWorkspaceReaderUsedTest.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.maven.it; +package org.apache.maven.it.it8xxx.it8005; import java.io.File; +import org.apache.maven.it.AbstractMavenIntegrationTestCase; +import org.apache.maven.it.Verifier; import org.apache.maven.shared.verifier.util.ResourceExtractor; import org.junit.jupiter.api.Test; @@ -30,7 +32,7 @@ public MavenITmng8005IdeWorkspaceReaderUsedTest() { @Test public void testWithIdeWorkspaceReaderUsed() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-8005"); + File testDir = ResourceExtractor.simpleExtractResources(getClass(), "resources"); Verifier verifier = newVerifier(new File(testDir, "extension").getAbsolutePath()); verifier.addCliArgument("install"); diff --git a/its/core-it-suite/src/test/resources/mng-8005/.mvn/extensions.xml b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/.mvn/extensions.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/.mvn/extensions.xml rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/.mvn/extensions.xml diff --git a/its/core-it-suite/src/test/resources/mng-8005/extension/.mvn/.gitkeep b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/.mvn/.gitkeep similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/extension/.mvn/.gitkeep rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/.mvn/.gitkeep diff --git a/its/core-it-suite/src/test/resources/mng-8005/extension/pom.xml b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/pom.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/extension/pom.xml rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/pom.xml diff --git a/its/core-it-suite/src/test/resources/mng-8005/extension/src/main/java/org/apache/maven/its/extensions/IdeWorkspaceReader.java b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/src/main/java/org/apache/maven/its/extensions/IdeWorkspaceReader.java similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/extension/src/main/java/org/apache/maven/its/extensions/IdeWorkspaceReader.java rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/src/main/java/org/apache/maven/its/extensions/IdeWorkspaceReader.java diff --git a/its/core-it-suite/src/test/resources/mng-8005/extension/src/main/resources/META-INF/maven/extension.xml b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/src/main/resources/META-INF/maven/extension.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/extension/src/main/resources/META-INF/maven/extension.xml rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/extension/src/main/resources/META-INF/maven/extension.xml diff --git a/its/core-it-suite/src/test/resources/mng-8005/pom.xml b/its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/pom.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-8005/pom.xml rename to its/core-it-suite/src/test/java/org/apache/maven/it/it8xxx/it8005/resources/pom.xml From c17292042732f5c2dd19e7bcec1aaac7f20687ac Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 20 Nov 2024 23:05:43 +0100 Subject: [PATCH 2/2] Fix includes and excludes --- its/core-it-suite/pom.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index 3a08dbde2ef4..1f52e83ac64e 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -477,8 +477,11 @@ under the License. src/test/java + + org/apache/maven/it/it*/it*/*/** + - **/*.java + org/apache/maven/it/it*/it*/*.java @@ -488,6 +491,15 @@ under the License. + + org.apache.maven.plugins + maven-compiler-plugin + + + org/apache/maven/it/it*/it*/*/**/*.java + + + com.diffplug.spotless spotless-maven-plugin