-
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 #36425 from aloubyansky/cyclic-conditional-deps
Check whether a conditional dependency has already been activated before scheduling it for processing
- Loading branch information
Showing
2 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
.../quarkus/deployment/conditionaldeps/ConditionalDependencyDependingOnItsDependentTest.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,44 @@ | ||
package io.quarkus.deployment.conditionaldeps; | ||
|
||
import io.quarkus.bootstrap.resolver.TsArtifact; | ||
import io.quarkus.bootstrap.resolver.TsQuarkusExt; | ||
import io.quarkus.deployment.runnerjar.BootstrapFromOriginalJarTestBase; | ||
|
||
public class ConditionalDependencyDependingOnItsDependentTest extends BootstrapFromOriginalJarTestBase { | ||
|
||
@Override | ||
protected TsArtifact composeApplication() { | ||
|
||
final TsQuarkusExt extGConditional = new TsQuarkusExt("ext-g-conditional"); | ||
|
||
final TsQuarkusExt extA = new TsQuarkusExt("ext-a"); | ||
extA.setConditionalDeps(extGConditional); | ||
extGConditional.addDependency(extA); | ||
|
||
final TsQuarkusExt extB = new TsQuarkusExt("ext-b"); | ||
extGConditional.setDependencyCondition(extB); | ||
|
||
addToExpectedLib(extA.getRuntime()); | ||
addToExpectedLib(extB.getRuntime()); | ||
addToExpectedLib(extGConditional.getRuntime()); | ||
|
||
install(extA); | ||
install(extB); | ||
install(extGConditional); | ||
|
||
return TsArtifact.jar("app") | ||
.addManagedDependency(platformDescriptor()) | ||
.addManagedDependency(platformProperties()) | ||
.addDependency(extA) | ||
.addDependency(extB); | ||
} | ||
|
||
@Override | ||
protected String[] expectedExtensionDependencies() { | ||
return new String[] { | ||
"ext-a", | ||
"ext-b", | ||
"ext-g-conditional" | ||
}; | ||
} | ||
} |
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