From 00ed182fcd60b9b9f5652fa54e04b6c7b07204c8 Mon Sep 17 00:00:00 2001 From: Jason Faust Date: Sat, 26 Mar 2022 23:55:15 -0400 Subject: [PATCH] Minimal test for issue 230 --- .../pom.xml | 29 +++++++++++++++++++ .../src/main/java/ex/A.java | 2 ++ .../src/main/java/module-info.java | 1 + .../src/test/java/ex/ATest.java | 2 ++ .../compiler/MavenCompilerPluginTest.java | 7 +++++ 5 files changed, 41 insertions(+) create mode 100644 tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/pom.xml create mode 100644 tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/ex/A.java create mode 100644 tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/module-info.java create mode 100644 tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/test/java/ex/ATest.java diff --git a/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/pom.xml b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/pom.xml new file mode 100644 index 0000000000..2501562bcd --- /dev/null +++ b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + tycho-its-project.compiler.mavenCompilerPlugin.moduleWithTests + c.m.m + 0.0.1-SNAPSHOT + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + jdt + 17 + 17 + + + + org.eclipse.tycho + tycho-compiler-jdt + ${tycho-version} + + + + + + + \ No newline at end of file diff --git a/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/ex/A.java b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/ex/A.java new file mode 100644 index 0000000000..58d96c2cfe --- /dev/null +++ b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/ex/A.java @@ -0,0 +1,2 @@ +package ex; +public class A {} diff --git a/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/module-info.java b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/module-info.java new file mode 100644 index 0000000000..ec3e20809d --- /dev/null +++ b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/main/java/module-info.java @@ -0,0 +1 @@ +module ex {} diff --git a/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/test/java/ex/ATest.java b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/test/java/ex/ATest.java new file mode 100644 index 0000000000..8d25eed4c5 --- /dev/null +++ b/tycho-its/projects/compiler.mavenCompilerPlugin.moduleWithTests/src/test/java/ex/ATest.java @@ -0,0 +1,2 @@ +package ex; +class ATest {} diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/MavenCompilerPluginTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/MavenCompilerPluginTest.java index c411dcff0d..a47c2f19a3 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/MavenCompilerPluginTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/MavenCompilerPluginTest.java @@ -32,6 +32,13 @@ public void testJDTCompilerId() throws Exception { verifier.verifyTextInLog("field Foo.unused is not used"); } + @Test + public void testMavenCompilerPluginModuleWithTests() throws Exception { + Verifier verifier = getVerifier("compiler.mavenCompilerPlugin.moduleWithTests", false); + verifier.executeGoal("verify"); + verifier.verifyErrorFreeLog(); + } + @Test public void testAdditionalBundles() throws Exception { Verifier verifier = getVerifier("compiler.additional.bundles", true);