Skip to content

Commit

Permalink
Add a constant for the Maven groupId
Browse files Browse the repository at this point in the history
  • Loading branch information
lazar-mitrovic committed Jun 24, 2021
1 parent cfcd5c8 commit b20363e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public class Utils {
public static final String NATIVE_TESTS_EXE = "native-tests" + EXECUTABLE_EXTENSION;
public static final String AGENT_FILTER = "agent-filter.json";
public static final String PERSIST_CONFIG_PROPERTY = "persistConfig";
public static final String MAVEN_GROUP_ID = "org.graalvm.buildtools";

public static Path getJavaHomeNativeImage(String javaHomeVariable, Boolean failFast) {
String graalHome = System.getenv(javaHomeVariable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void setAgentArgs(Project project, String sourceSetName, Task task, Bool
}

private void injectTestPluginDependencies(Project project) {
project.getDependencies().add("implementation", "org.graalvm.buildtools:junit-platform-native:"
project.getDependencies().add("implementation", Utils.MAVEN_GROUP_ID + ":junit-platform-native:"
+ VersionInfo.JUNIT_PLATFORM_NATIVE_VERSION);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public class Utils {
public static final String NATIVE_TESTS_EXE = "native-tests" + EXECUTABLE_EXTENSION;
public static final String AGENT_FILTER = "agent-filter.json";
public static final String PERSIST_CONFIG_PROPERTY = "persistConfig";
public static final String MAVEN_GROUP_ID = "org.graalvm.buildtools";

public static Path getJavaHomeNativeImage(String javaHomeVariable, Boolean failFast) {
String graalHome = System.getenv(javaHomeVariable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void runTests(Path targetFolder) throws MojoExecutionException {
private String getClassPath() throws MojoFailureException {
try {
List<Artifact> pluginDependencies = pluginArtifacts.stream()
.filter(it -> it.getGroupId().startsWith("org.graalvm.nativeimage") || it.getGroupId().startsWith("org.junit"))
.filter(it -> it.getGroupId().startsWith(Utils.MAVEN_GROUP_ID) || it.getGroupId().startsWith("org.junit"))
.collect(Collectors.toList());

List<String> projectClassPath = new ArrayList<>(project
Expand Down

0 comments on commit b20363e

Please sign in to comment.