ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Clay <>
Subject instrumented vs non-instrumented artifacts with shared dependencies
Date Mon, 29 Nov 2010 20:31:10 GMT
Here’s an interesting use case for your consideration.  I’m using ivy currently, 
but I’m not happy with some of the configuration.  I’d like to get your input to 
see if a simpler way exists (or perhaps file a feature request to make this 
I have a multi-module project (30+ modules), each with 5+ configurations.  I’ll 
simplify this down to the very basics.... two modules, with two configurations 
For each module:
	* a non-instrumented runtime  jar is published under the “deploy” configuration 
, and
	* an instrumented runtime jar is published under the “instrumented” 
Dev uses the instrumented jars for unit test code coverage, and QA uses them for 
their testing code coverage.  The non-instrumented jars are used in production.
An instrumented deployment consists of A) our instrumented jars and B) 3rd party 
dependencies.  A non-instrumented deployment consists of C) our non-instrumented 
jars and B) 3rd party dependencies.
Here is a vastly simplified example of two of our modules as currently 
configured.  moduleB depends on moduleA....
    <infomodule="moduleA" organisation=""/>
        <artifactconf="deploy" type="jar"/>
        <artifactconf="instrumented" type="instrumented.jar"/>
        <dependencyconf="deploy;instrumented->deploy" org="org.apache" 
<ivy-modulexmlns:xsi="" version="2.0"
        <artifactconf="deploy" type="jar"/>
        <artifactconf="instrumented" type="instrumented.jar"/>
        <dependencyconf="deploy;instrumented" org="" name="moduleA"/>
        <dependencyconf="deploy;instrumented->deploy" org="org.apache" 
This works, but I’m managing 30+ modules, each with LOTS of dependencies.  I 
want to simplify the configuration down to the least possible denominator.  (I'm 
seeing other developers consistently forget to add the "instrumented->deploy" 
configuration for 3rd party dependencies.  I want to simplify the configuration 
to reduce the possible errors.)

Ideally, I would like to completely remove any mention of “instrumented->deploy” 
or “instrumented” from the dependencies section.  i.e. I would like to be able 
to completely handle the instrumented vs non-instrumented logic in the 
configurations and/or publications section.
If that is not possible, I would at least like to remove the 
“instrumented->deploy” mapping for all third party dependencies that also have 
the “deploy” configuration in the dependency element.  (i.e. leave 
“instrumented” in the dependency configuration for sibling modules in the same 
Initially, I thought I could just make the “instrumented” configuration extend 
the “deploy” configuration.  BUT if I did that, it would mean that anybody that 
depended on the “instrumented” configuration of moduleA would retrieve BOTH the 
non-instrumented and instrumented jars, which is not what I want.
A few possibilities come to mind:
	* Be able to exclude configurations to which an artifact is published  (e.g. 
<artifactconf="deploy,!instrumented" type="jar"/>)
	* Be able to exclude artifacts in the conf element (e.g. 
<confname="instrumented" extends="deploy"><exclude org="" 
	* Allow a configuration to 'inherit' only dependencies, but not publications.

Is what I’m looking for currently possible with ivy today?
If not, does anybody have a suggestion on how this could look if ivy were to 
support this type of configuration?
Thanks for the consideration.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message