Skip to content

Commit

Permalink
Expand ITs
Browse files Browse the repository at this point in the history
To run on 3 major Maven versions
  • Loading branch information
cstamas committed Feb 27, 2024
1 parent c552dd9 commit 095e040
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
15 changes: 14 additions & 1 deletion takari-plugin-testing-its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>unpack</id>
Expand All @@ -127,6 +126,20 @@
<classifier>bin</classifier>
<type>tar.gz</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.maven</groupId>
<artifactId>apache-maven</artifactId>
<version>3.8.8</version>
<classifier>bin</classifier>
<type>tar.gz</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.maven</groupId>
<artifactId>apache-maven</artifactId>
<version>3.9.6</version>
<classifier>bin</classifier>
<type>tar.gz</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class IntegrationTest {
public static List<Object[]> versions() {
List<Object[]> parameters = new ArrayList<>();
parameters.add(new Object[] {"3.6.3"});
parameters.add(new Object[] {"3.8.8"});
parameters.add(new Object[] {"3.9.6"});
return parameters;
}

Expand All @@ -44,7 +46,7 @@ public static List<Object[]> versions() {

public IntegrationTest(String version) throws Exception {
this.version = version;
File mavenHome = new File("target/apache-maven-3.6.3");
File mavenHome = new File("target/apache-maven-" + version);
this.maven = MavenRuntime.builder(mavenHome, null).forkedBuilder().build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
import io.takari.maven.testing.executor.MavenInstallations;
import io.takari.maven.testing.executor.MavenRuntime;
import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder;
import io.takari.maven.testing.executor.MavenVersions;
import io.takari.maven.testing.executor.junit.MavenPluginTest;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.extension.RegisterExtension;

@MavenVersions("3.8.4")
@MavenInstallations("target/apache-maven-3.6.3")
@MavenInstallations({"target/apache-maven-3.6.3", "target/apache-maven-3.8.8", "target/apache-maven-3.9.6"})
public class JUnit5IntegrationTests {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;
import org.junit.jupiter.api.extension.ExtensionContext;
Expand Down Expand Up @@ -86,7 +86,7 @@ void testUnitTestHarnessHonoursUserSettings(MavenRuntime maven, String version)
static final class MavenVersionsSource implements ArgumentsProvider {

private List<String> getMavenVersions() {
return Collections.singletonList("3.6.3");
return Arrays.asList("3.6.3", "3.8.8", "3.9.6");
}

@Override
Expand Down

0 comments on commit 095e040

Please sign in to comment.