Skip to content

Allow MAVEN_HOME or M2_HOME for integration tests #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,18 @@ public abstract class IntegrationTestBaseClass {

@BeforeAll
public static void beforeAll() {
if (System.getenv("MAVEN_HOME") == null) {
String mvnHome = System.getenv("MAVEN_HOME");

if (mvnHome == null) {
mvnHome = System.getenv("M2_HOME");
}

if (mvnHome == null) {
System.err.println("You must set $MAVEN_HOME on your system for the integration test to run.");
throw new RuntimeException();
}
System.setProperty("maven.home", System.getenv("MAVEN_HOME"));

System.setProperty("maven.home", mvnHome);
}

@BeforeEach
Expand Down

This file was deleted.