From b66f828c2eb0ed750809a15ef51775272d310de2 Mon Sep 17 00:00:00 2001 From: Georgii Troitskii Date: Thu, 18 Jul 2024 07:39:19 +0200 Subject: [PATCH] Replace deprecated app-model methods --- .../QuarkusApplicationManagedResourceBuilder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationManagedResourceBuilder.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationManagedResourceBuilder.java index 9d1978df8..0170484ab 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationManagedResourceBuilder.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationManagedResourceBuilder.java @@ -22,10 +22,10 @@ import org.apache.commons.lang3.StringUtils; -import io.quarkus.bootstrap.model.AppArtifact; -import io.quarkus.bootstrap.model.AppDependency; import io.quarkus.builder.Version; import io.quarkus.deployment.configuration.BuildTimeConfigurationReader; +import io.quarkus.maven.dependency.ArtifactCoords; +import io.quarkus.maven.dependency.ArtifactDependency; import io.quarkus.runtime.LaunchMode; import io.quarkus.test.bootstrap.ManagedResourceBuilder; import io.quarkus.test.bootstrap.ServiceContext; @@ -59,7 +59,7 @@ public abstract class QuarkusApplicationManagedResourceBuilder implements Manage * Whether build consist of all source classes or only some of them. */ private boolean buildWithAllClasses = true; - private List forcedDependencies = Collections.emptyList(); + private List forcedDependencies = Collections.emptyList(); private boolean requiresCustomBuild = false; private ServiceContext context; private String propertiesFile = APPLICATION_PROPERTIES; @@ -107,7 +107,7 @@ protected boolean isBuildWithAllClasses() { return buildWithAllClasses; } - protected List getForcedDependencies() { + protected List getForcedDependencies() { return forcedDependencies; } @@ -209,8 +209,8 @@ public void initForcedDependencies(Dependency[] forcedDependencies) { this.forcedDependencies = Stream.of(forcedDependencies).map(d -> { String groupId = StringUtils.defaultIfEmpty(resolveProperty(d.groupId()), QUARKUS_GROUP_ID_DEFAULT); String version = StringUtils.defaultIfEmpty(resolveProperty(d.version()), Version.getVersion()); - AppArtifact artifact = new AppArtifact(groupId, d.artifactId(), version); - return new AppDependency(artifact, DEPENDENCY_SCOPE_DEFAULT, DEPENDENCY_DIRECT_FLAG); + ArtifactCoords artifactCoords = ArtifactCoords.jar(groupId, d.artifactId(), version); + return new ArtifactDependency(artifactCoords, DEPENDENCY_SCOPE_DEFAULT, DEPENDENCY_DIRECT_FLAG); }).collect(Collectors.toList()); } }