An example artifact that optionally depends on conditional-b.
An example artifact that has activationCondition in form of artifactPresent(org.slf4j:slf4j-api).
An example artifact that declares capability consumption on label slf4j-backend.
An example artifact that declares capability provider on label slf4j-backend.
- Case1:
mvn packagebuild FAILS - consumption not satisfied. - Case2:
mvn package -P satisfy, here profile pulls inprovider-aand consumption is satisfied, build SUCCEEDS. - Case3:
mvn package -P discover, here profile provides instructions how to discover provider, build SUCCEEDS.
PoC:
TBD
- Case1:
mvn toolbox:treedependencyslf4j-simpleis absent from tree (condition is not satisfied). - Case2:
mvn toolbox:tree -P satisfy, dependencyslf4j-simpleis present in tree (condition is satisfied).
PoC:
See https://gist.github.com/cstamas/e4236de328b5da3df1e7c743eaa5abfa or https://gist.github.com/cstamas/571c11d40c9634122109dd3cc8825cb2 The implementation happens within Resolver collection and has nothing to do which tool we use to "draw the tree".