开发者

How do I exclude some dependencies without forcing other dependencies to define configurations

开发者 https://www.devze.com 2023-04-03 17:25 出处:网络
Our bootstrap process uses an ivy conf to deliver a build harness and some tools (ant libs).Our default configuration should deliver compilation and runtime dependenc开发者_如何学JAVAies.

Our bootstrap process uses an ivy conf to deliver a build harness and some tools (ant libs). Our default configuration should deliver compilation and runtime dependenc开发者_如何学JAVAies.

I'd like conf="bootstrap" to only deliver the harness and I'd like the developers to be able to add deps without needing to wrestle with configurations.

I initially tried creating a default configuration but this required dependencies to do likewise which isn't what I want.

I tried default="default->*" but then my bootstrap gets included in default.

How can I keep these two separate without imposing demands on the dependencies or forcing conf="default->*" to be added to all of my "default" dependencies?

  <configurations default="default">
    <conf name="bootstrap" visibility="private" description="Scripts/Tools for Build Sys"/>
    <conf name="default" description="Dependencies Used By This Module"/>
  </configurations>

  <dependencies>
    <dependency conf="bootstrap->default" org="myorg" name="build-harness" rev="1.+"/>
    <dependency org="myorg" name="logging" rev="1.0.0.+"/> 
  </dependencies>

If I define a configuration then do all of my deps need to do so as well? Is there a way to setup a default mapping?

Thanks for the help

Peter


I believe this is what I want:

  • set default configuration mapping to include any dep config in my default
  • add default and a private bootstrap configuration
  • add my build harness as 'bootstrap' and link it to the harnesses default - since the harness lacks user defined conf default = '*'

When I retrieve with no configuration I get the default which is all the compilation / runtime dependencies. When I retrieve 'bootstrap' conf I just get the bootstrap.

  <configurations defaultconfmapping="default->*">
    <conf name="bootstrap" visibility="private" description="Scripts/Tools for Build Sys"/>
    <conf name="default" description="Dependencies Used By This Module"/>
  </configurations>

  <dependencies>
    <dependency conf="bootstrap->default" org="myorg" name="build-harness" rev="1.+"/>
    <dependency org="myorg" name="logging" rev="1.0.0.+"/> 
  </dependencies>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号