-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 #44700 from aloubyansky/conditional-non-extension-dep
Support conditional dependencies on regular artifacts
- Loading branch information
Showing
18 changed files
with
341 additions
and
169 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
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
59 changes: 59 additions & 0 deletions
59
...e/src/test/java/io/quarkus/bootstrap/resolver/test/RequiredConditionalDependencyTest.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,59 @@ | ||
package io.quarkus.bootstrap.resolver.test; | ||
|
||
import io.quarkus.bootstrap.resolver.BootstrapAppModelResolver; | ||
import io.quarkus.bootstrap.resolver.CollectDependenciesBase; | ||
import io.quarkus.bootstrap.resolver.TsQuarkusExt; | ||
import io.quarkus.bootstrap.resolver.maven.workspace.LocalProject; | ||
import io.quarkus.maven.dependency.DependencyFlags; | ||
|
||
public class RequiredConditionalDependencyTest extends CollectDependenciesBase { | ||
|
||
@Override | ||
protected BootstrapAppModelResolver newAppModelResolver(LocalProject currentProject) throws Exception { | ||
var resolver = super.newAppModelResolver(currentProject); | ||
//resolver.setIncubatingModelResolver(false); | ||
return resolver; | ||
} | ||
|
||
@Override | ||
protected void setupDependencies() { | ||
final TsQuarkusExt extA = new TsQuarkusExt("ext-a"); | ||
installAsDep(extA); | ||
final TsQuarkusExt extB = new TsQuarkusExt("ext-b"); | ||
extB.setDependencyCondition(extA); | ||
install(extB, false); | ||
addCollectedDep(extB.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | ||
| DependencyFlags.DEPLOYMENT_CP | ||
| DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(extB.getDeployment()); | ||
final TsQuarkusExt extC = new TsQuarkusExt("ext-c"); | ||
extC.setConditionalDeps(extB); | ||
install(extC, false); | ||
addCollectedDep(extC.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | ||
| DependencyFlags.DEPLOYMENT_CP | ||
| DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(extC.getDeployment()); | ||
final TsQuarkusExt extD = new TsQuarkusExt("ext-d"); | ||
extD.addDependency(extC); | ||
install(extD, false); | ||
addCollectedDep(extD.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | ||
| DependencyFlags.DEPLOYMENT_CP | ||
| DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(extD.getDeployment()); | ||
final TsQuarkusExt extE = new TsQuarkusExt("ext-e"); | ||
extE.addDependency(extD); | ||
extE.setDependencyCondition(extA); | ||
install(extE, false); | ||
addCollectedDep(extE.getRuntime(), | ||
DependencyFlags.RUNTIME_CP | ||
| DependencyFlags.DEPLOYMENT_CP | ||
| DependencyFlags.RUNTIME_EXTENSION_ARTIFACT); | ||
addCollectedDeploymentDep(extE.getDeployment()); | ||
final TsQuarkusExt extF = new TsQuarkusExt("ext-f"); | ||
extF.setConditionalDeps(extE); | ||
installAsDep(extF); | ||
} | ||
} |
Oops, something went wrong.