Stéphane TOUSSAINT wrote at Mittwoch, 3. März 2010 10:59:

> 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.

http://jira.codehaus.org/browse/MNG-2589 and linked stuff.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to