You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dr_pompeii <dr...@yahoo.com> on 2009/06/28 23:27:20 UTC

about dependences between projects

Hello Guys

I have this situation and I cant understand the follow behaviour

I have 2 projects nothing related between them

therefore project One in some java class need and import
import org.apache.commons.lang.StringUtils;

I must add in my pom.xml this dependence

 <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.2</version>
 </dependency>

of course if I compile without such dependence I receive this type of error

....e.java:[48,20] cannot find symbol
symbol  : variable StringUtils
location: class com.jordan.......CustomerConsole

In my other project (Two) in some java class import again the same package
import org.apache.commons.lang.StringUtils; but for my good luck
I forget to include in my pom.xml the dependence and I proceed to compile
 <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.2</version>
 </dependency>

the weird of this case is that for this project I never receive some error
message
why? 

Even If I comment such dependence in the pom for the first project I receive
again the error

Can some member tell me why this difference?

Thanks in advanced

-- 
View this message in context: http://www.nabble.com/about-dependences-between-projects-tp24245669p24245669.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: about dependences between projects

Posted by dr_pompeii <dr...@yahoo.com>.
Hello Wayne 

Sorry for me delay and Thanks for the reply

Clear now the explanation

Best Regards


Wayne Fay wrote:
> 
>> Even If I comment such dependence in the pom for the first project I
>> receive
>> again the error
>> Can some member tell me why this difference?
> 
> Dependencies can also be brought in transitively. Do you have any
> other dependencies in project2? One of them may have commons-lang as a
> "compile" dependency itself which is thus adding the dependency to
> your project2 without you even realizing it.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/about-dependences-between-projects-tp24245669p24322602.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: about dependences between projects

Posted by Wayne Fay <wa...@gmail.com>.
> Even If I comment such dependence in the pom for the first project I receive
> again the error
> Can some member tell me why this difference?

Dependencies can also be brought in transitively. Do you have any
other dependencies in project2? One of them may have commons-lang as a
"compile" dependency itself which is thus adding the dependency to
your project2 without you even realizing it.

Wayne

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