You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by bhatia <Bh...@OFAC.CH> on 2007/08/21 14:03:26 UTC

newbie configuration question

Hello, 

I want to specify that module OFACDI can participate in a compile and/or run
configuration of its caller module. For compilation, we have circular
dependencies so I am setting transitive="true" to be able to compile my
project despite circular deps. Am I on the right track here ?

The basic idea is that to compile my project, I want to use "compile" config
with transitive="true" (for circular deps) and to publish I want a "run"
config.

**********************************************
<ivy-module version="1.0">
<info organisation="ofac" module="OFACDI" revision="prod"/>
<configurations>
   <conf name="compile" description="compile-time deps only, transitive
since we have spaghetti type dependencies" transitive="true"
visibility="public"/>
   <conf name="run" description="run-time deps only, also used for creating
and publishing an artifact" transitive="false" visibility="public"/>   
</configurations>
<publications>
	<artifact name="OFACDI" type="jar"/>
	<artifact name="OFACDI" type="source" ext="src.jar"/>
</publications>
 <dependencies>
    <dependency org="ofac" name="OFACPool" rev="prod" changing="true"
conf="compile, run"/>
 </dependencies>
 <conflicts>
    <manager name="ofac-cm" org="ofac"/>
    <manager name="latest-revision" org="(?!ofac).*"/>
 </conflicts>
</ivy-module>

**********************************************

thanks a lot


-- 
View this message in context: http://www.nabble.com/newbie-configuration-question-tf4304746.html#a12253284
Sent from the ivy-user mailing list archive at Nabble.com.


Re: newbie configuration question

Posted by Xavier Hanin <xa...@gmail.com>.
On 8/21/07, bhatia <Bh...@ofac.ch> wrote:
>
>
> Hello,
>
> I want to specify that module OFACDI can participate in a compile and/or
> run
> configuration of its caller module. For compilation, we have circular
> dependencies so I am setting transitive="true" to be able to compile my
> project despite circular deps. Am I on the right track here ?


transitive="true" is the default, and won't help you solve your circular
dependency problem. If you want to disable transitivity, use
transitive="false" and you won't have any circular dependency problem. But
I'm not sure to get what you really want, so here are some ideas about how
to handle circular dependencies:
- break the circular dependencies between your modules: cleanest, but not
always achievable
- break the circular dependencies in configurations, for instance A->B->A
breaked in A(conf1)->B(conf1);B(conf2)->A(conf2): sometimes easier to
achieve than first solution, but not very easy to maintain
- use a circular dependency strategy adapted to your needs: you can allow
circular dependencies, thus not requiring any change in your modules: use
this when you can't break your circular dependencies at all.

HTH,

Xavier

The basic idea is that to compile my project, I want to use "compile" config
> with transitive="true" (for circular deps) and to publish I want a "run"
> config.
>
> **********************************************
> <ivy-module version="1.0">
> <info organisation="ofac" module="OFACDI" revision="prod"/>
> <configurations>
>    <conf name="compile" description="compile-time deps only, transitive
> since we have spaghetti type dependencies" transitive="true"
> visibility="public"/>
>    <conf name="run" description="run-time deps only, also used for
> creating
> and publishing an artifact" transitive="false" visibility="public"/>
> </configurations>
> <publications>
>         <artifact name="OFACDI" type="jar"/>
>         <artifact name="OFACDI" type="source" ext="src.jar"/>
> </publications>
> <dependencies>
>     <dependency org="ofac" name="OFACPool" rev="prod" changing="true"
> conf="compile, run"/>
> </dependencies>
> <conflicts>
>     <manager name="ofac-cm" org="ofac"/>
>     <manager name="latest-revision" org="(?!ofac).*"/>
> </conflicts>
> </ivy-module>
>
> **********************************************
>
> thanks a lot
>
>
> --
> View this message in context:
> http://www.nabble.com/newbie-configuration-question-tf4304746.html#a12253284
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/