Skip to content
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

Replace deprecated app-model methods in QuarkusApplicationManagedResourceBuilder #1206

Merged
Merged
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 @@ -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;
Expand Down Expand Up @@ -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<AppDependency> forcedDependencies = Collections.emptyList();
private List<ArtifactDependency> forcedDependencies = Collections.emptyList();
private boolean requiresCustomBuild = false;
private ServiceContext context;
private String propertiesFile = APPLICATION_PROPERTIES;
Expand Down Expand Up @@ -107,7 +107,7 @@ protected boolean isBuildWithAllClasses() {
return buildWithAllClasses;
}

protected List<AppDependency> getForcedDependencies() {
protected List<ArtifactDependency> getForcedDependencies() {
return forcedDependencies;
}

Expand Down Expand Up @@ -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());
}
}
Expand Down
Loading