Re: Reflexion about dependencies.

2010-03-03 Thread Stéphane TOUSSAINT

Hi Patrick

For a more complete anwser, read:

http://www.sonatype.com/people/2009/10/maven-tips-and-tricks-optimizing-with-the-maven-dependency-plugin/
  

Thank you for your input.

Stéphane

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



Re: Reflexion about dependencies.

2010-03-03 Thread Stéphane TOUSSAINT



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

Thanks Jörg this is the issue I have to keep an eye on.

Stéphane

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



Re: Reflexion about dependencies.

2010-03-03 Thread Stéphane TOUSSAINT




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 :

  
The fact is that some dependencies that I use, handles other dependencies
that I use too. My IDE is therefore unable to tell me that I forget to add a
dependency because of the transitivity.

  
  
If a given module uses an artifact directly, it must be included as a
dependency in its pom file, not as a transitive dep.

If that doesn't answer your question, perhaps a concrete explanation
of what you're describing would make things more clear.

Wayne

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

  


-- 

Stéphane
TOUSSAINT
Tel : 01.61.08.50.27
Std : 01.61.08.50.20
Fax : 01.61.38.24.41





Reflexion about dependencies.

2010-03-02 Thread Stéphane TOUSSAINT

Hi,

First of all, sorry if I talk about something already well debated. But 
I haven't found informations (best practice), about this point.


If I understand well the maven documentation, I MUST added into my 
pom.xml any dependences with which I currently work (at least any 
dependency from which a class is used as import).
The fact is that some dependencies that I use, handles other 
dependencies that I use too. My IDE is therefore unable to tell me that 
I forget to add a dependency because of the transitivity.


The question I just come to asked me is why transitive dependencies are 
not seen as 'RUNTIME' dependencies so they are not part of the 
compilation of my own code ?
With such a feature, my IDE is able to enlights packages, classes that I 
don't explicitly includes in my pom.xml


Guess that it isn't that easy but then, can I have some inputs on this ?

Thanks in advance.

Stéphane Toussaint

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