|
That is the point. A sample : my.project:test:1.0-SNAPSHOT (a Project) my.utility:xml:1.0 (an utils librarie) dom4j:dom4j:1.6 (the well known XML library) I added to my.project:test the my.utility:xml which talk about XML which use (and include in it's pom.xml) the dom4j:dom4j:1.6 artifact. my.project:test |----> my.utility:xml |----> dom4j:dom4j I can now work with classes from my.utility:xml. Everything OK, compiles, packages, as expected. But now, nothing prevents me to use directly classes from dom4j in my own code. The compiler will not complains, but it should because the dom4j is only a transitive dependency. I must add dom4j to my.project:test pom.xml before using it, mustn't I ?. This sample is light enough to take care of, but what if I play with a lot more librairies. The point is why not treat dom4j:dom4j as a 'RUNTIME' library from the my.project:test point of view ? The compiler will explicitly tell me that dom4j classes are not part of my compilation classpath and that I have to add it in my pom my.project:test |----> my.utility:xml | |----> dom4j:dom4j |----> dom4j:dom4j Hoping I make things more clear. Stéphane Wayne Fay a écrit :
--
![]() Stéphane TOUSSAINT Tel : 01.61.08.50.27 Std : 01.61.08.50.20 Fax : 01.61.38.24.41 |
- Reflexion about dependencies. Stéphane TOUSSAINT
- Re: Reflexion about dependencies. Wayne Fay
- Re: Reflexion about dependencies. Patrick Turcotte
- Re: Reflexion about dependencies. Patrick Turcotte
- Re: Reflexion about dependencies. Stéphane TOUSSAINT
- Re: Reflexion about dependencies. Stéphane TOUSSAINT
- Re: Reflexion about dependencies. Jörg Schaible
- Re: Reflexion about dependencies. Stéphane TOUSSAINT
- Re: Reflexion about dependencies... Jörg Schaible

