Skip to content

Commit

Permalink
Merge Gradle/Maven starter projects to reduce duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Feb 9, 2025
1 parent ed5ac99 commit bfd5ebb
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,6 @@
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
println("Using Java version: ${java.version}")
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GradleStarterTests {
@Test
void gradle_wrapper(@TempDir Path workspace, @FilePrefix("gradle") OutputFiles outputFiles) throws Exception {
var result = ProcessStarters.gradlew() //
.workingDir(copyToWorkspace(Projects.GRADLE_STARTER, workspace)) //
.workingDir(copyToWorkspace(Projects.JUPITER_STARTER, workspace)) //
.addArguments("-Dmaven.repo=" + MavenRepo.dir()) //
.addArguments("build", "--no-daemon", "--stacktrace", "--no-build-cache", "--warning-mode=fail") //
.putEnvironment("JDK8", Helper.getJavaHome("8").orElseThrow(TestAbortedException::new).toString()) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class MavenStarterTests {
MavenRepoProxy mavenRepoProxy;

@Test
void verifyMavenStarterProject(@TempDir Path workspace, @FilePrefix("maven") OutputFiles outputFiles)
void verifyJupiterStarterProject(@TempDir Path workspace, @FilePrefix("maven") OutputFiles outputFiles)
throws Exception {
var result = ProcessStarters.maven(Helper.getJavaHome("8").orElseThrow(TestAbortedException::new)) //
.workingDir(copyToWorkspace(Projects.MAVEN_STARTER, workspace)) //
.workingDir(copyToWorkspace(Projects.JUPITER_STARTER, workspace)) //
.addArguments(localMavenRepo.toCliArgument(), "-Dmaven.repo=" + MavenRepo.dir()) //
.addArguments("-Dsnapshot.repo.url=" + mavenRepoProxy.getBaseUri()) //
.addArguments("--update-snapshots", "--batch-mode", "verify") //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ public class Projects {
public static final String GRAALVM_STARTER = "graalvm-starter";
public static final String GRADLE_KOTLIN_EXTENSIONS = "gradle-kotlin-extensions";
public static final String GRADLE_MISSING_ENGINE = "gradle-missing-engine";
public static final String GRADLE_STARTER = "gradle-starter";
public static final String JAR_DESCRIBE_MODULE = "jar-describe-module";
public static final String JAVA_VERSIONS = "java-versions";
public static final String MAVEN_STARTER = "maven-starter";
public static final String JUPITER_STARTER = "jupiter-starter";
public static final String MAVEN_SUREFIRE_COMPATIBILITY = "maven-surefire-compatibility";
public static final String MULTI_RELEASE_JAR = "multi-release-jar";
public static final String REFLECTION_TESTS = "reflection-tests";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UnalignedClasspathTests {
void verifyErrorMessageForUnalignedClasspath(JRE jre, Path javaHome, @TempDir Path workspace,
@FilePrefix("maven") OutputFiles outputFiles) throws Exception {
var starter = ProcessStarters.maven(javaHome) //
.workingDir(copyToWorkspace(Projects.MAVEN_STARTER, workspace)) //
.workingDir(copyToWorkspace(Projects.JUPITER_STARTER, workspace)) //
.addArguments(localMavenRepo.toCliArgument(), "-Dmaven.repo=" + MavenRepo.dir()) //
.addArguments("-Dsnapshot.repo.url=" + mavenRepoProxy.getBaseUri()) //
.addArguments("-Djunit.platform.commons.version=1.11.4").addArguments("--update-snapshots",
Expand Down

0 comments on commit bfd5ebb

Please sign in to comment.