forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#44666 from aloubyansky/amazon-services-c…
…onditional-dep Fix conditional dependency resolution when runtime-deployment dependencies are not mirrored
- Loading branch information
Showing
13 changed files
with
502 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...r/test/ConditionalDependenciesDirectDependencyOnTransitiveDeploymentArtifactTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package io.quarkus.bootstrap.resolver.test; | ||
|
||
import io.quarkus.bootstrap.resolver.BootstrapAppModelResolver; | ||
import io.quarkus.bootstrap.resolver.CollectDependenciesBase; | ||
import io.quarkus.bootstrap.resolver.TsArtifact; | ||
import io.quarkus.bootstrap.resolver.TsQuarkusExt; | ||
import io.quarkus.bootstrap.resolver.maven.workspace.LocalProject; | ||
import io.quarkus.maven.dependency.DependencyFlags; | ||
|
||
public class ConditionalDependenciesDirectDependencyOnTransitiveDeploymentArtifactTestCase extends CollectDependenciesBase { | ||
|
||
@Override | ||
protected BootstrapAppModelResolver newAppModelResolver(LocalProject currentProject) throws Exception { | ||
var resolver = super.newAppModelResolver(currentProject); | ||
//resolver.setIncubatingModelResolver(true); | ||
return resolver; | ||
} | ||
|
||
@Override | ||
protected void setupDependencies() { | ||
|
||
final TsQuarkusExt quarkusCore = new TsQuarkusExt("quarkus-core"); | ||
install(quarkusCore); | ||
|
||
TsArtifact nettyNioClient = TsArtifact.jar("netty-nio-client"); | ||
|
||
final TsQuarkusExt nettyClientInternalExt = new TsQuarkusExt("netty-client-internal"); | ||
nettyClientInternalExt.addDependency(quarkusCore); | ||
nettyClientInternalExt.getRuntime().addDependency(nettyNioClient, true); | ||
nettyClientInternalExt.setDependencyCondition(nettyNioClient); | ||
install(nettyClientInternalExt, false); | ||
addCollectedDep(nettyClientInternalExt.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | DependencyFlags.DEPLOYMENT_CP | DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(nettyClientInternalExt.getDeployment()); | ||
|
||
final TsQuarkusExt commonExt = new TsQuarkusExt("common"); | ||
commonExt.addDependency(quarkusCore); | ||
commonExt.getRuntime().addDependency(nettyNioClient, true); | ||
commonExt.getRuntime().addDependency(nettyClientInternalExt.getRuntime(), true); | ||
commonExt.getDeployment().addDependency(nettyClientInternalExt.getDeployment(), true); | ||
commonExt.setConditionalDeps(nettyClientInternalExt); | ||
install(commonExt, false); | ||
addCollectedDep(commonExt.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | DependencyFlags.DEPLOYMENT_CP | DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(commonExt.getDeployment()); | ||
|
||
final TsQuarkusExt sqsExt = new TsQuarkusExt("sqs"); | ||
sqsExt.addDependency(quarkusCore); | ||
sqsExt.getRuntime().addDependency(commonExt.getRuntime()); | ||
sqsExt.getRuntime().addDependency(nettyNioClient, true); | ||
sqsExt.getDeployment().addFirstDependency(commonExt.getDeployment()); | ||
addCollectedDep(sqsExt.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | DependencyFlags.DEPLOYMENT_CP | DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(sqsExt.getDeployment()); | ||
|
||
final TsQuarkusExt messagingSqsExt = new TsQuarkusExt("messaging-sqs"); | ||
messagingSqsExt.addDependency(quarkusCore); | ||
messagingSqsExt.addDependency(sqsExt); | ||
messagingSqsExt.getDeployment().addDependency(commonExt.getDeployment()); // this line breaks it | ||
|
||
installAsDep(messagingSqsExt); | ||
installAsDep(nettyNioClient); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.