You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2023/09/18 08:48:46 UTC
[camel-spring-boot] 13/37: Updates artifact to verify in MavenTest
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch camel-spring-boot-4.0.0-branch
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 866aad6bb602125636fc92be96ac2cbf9d29226e
Author: Marco Carletti <mc...@redhat.com>
AuthorDate: Tue Jul 4 10:32:26 2023 +0200
Updates artifact to verify in MavenTest
---
.../src/test/java/org/apache/camel/springboot/patch/MavenTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tooling/redhat-patch-maven-plugin/src/test/java/org/apache/camel/springboot/patch/MavenTest.java b/tooling/redhat-patch-maven-plugin/src/test/java/org/apache/camel/springboot/patch/MavenTest.java
index bed846d39c4..f29a7a060b0 100644
--- a/tooling/redhat-patch-maven-plugin/src/test/java/org/apache/camel/springboot/patch/MavenTest.java
+++ b/tooling/redhat-patch-maven-plugin/src/test/java/org/apache/camel/springboot/patch/MavenTest.java
@@ -17,6 +17,7 @@ package org.apache.camel.springboot.patch;
import java.io.File;
import java.util.Properties;
+import java.util.ServiceLoader;
import com.google.inject.AbstractModule;
import org.apache.commons.io.FileUtils;
@@ -59,6 +60,8 @@ import org.eclipse.aether.version.VersionRange;
import org.apache.camel.springboot.patch.extensions.ZipWagon;
import org.apache.camel.springboot.patch.model.ProductVersion;
import org.junit.jupiter.api.Test;
+import org.junit.platform.engine.TestEngine;
+
import org.slf4j.ILoggerFactory;
import org.slf4j.LoggerFactory;
@@ -127,7 +130,8 @@ public class MavenTest {
session.setLocalRepositoryManager(resolverSystem.newLocalRepositoryManager(session, localRepository));
ArtifactRequest request = new ArtifactRequest();
- request.setArtifact(new DefaultArtifact("commons-io:commons-io:jar:2.8.0"));
+ String junitVersion = ServiceLoader.load(TestEngine.class).findFirst().get().getVersion().get();
+ request.setArtifact(new DefaultArtifact("org.junit.jupiter:junit-jupiter-engine:" + junitVersion));
ArtifactResult result = resolverSystem.resolveArtifact(session, request);
System.out.println(result.getArtifact().getFile());
}