You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Farhan Sarwar <fs...@vaudit.com> on 2007/08/10 21:41:57 UTC

Dependency project classes getting included in the resulting jar

Hey Guys,

 

Am experiencing a strange behavior, which I am not able to understand
why.Basically I have got two projects A and B where project A has a
dependency on the Project B, also I have a parent POM from which both these
projects are being inherited, the compilation and everything works fine, but
there is this behavior which I am not able to comprehend, i.e. when I build
the "project A" (which has dependency on B) the binary jar is generated as I
expected with only the classes of Project A, but when I do a build of both
the projects at the parent pom level the jar generated of the Project A also
contains the classes of project B which doesn't make sense to me, I mean why
are there binaries of the dependent project (i.e. B) is getting included in
it.

 

Any feedback would be highly appreciated.

 

Thanks and Regards,

 

Farhan.


Re: Dependency project classes getting included in the resulting jar

Posted by Jörg Schaible <jo...@gmx.de>.
Farhan Sarwar wrote:

> Hey Guys,
> 
>  
> 
> Am experiencing a strange behavior, which I am not able to understand
> why.Basically I have got two projects A and B where project A has a
> dependency on the Project B, also I have a parent POM from which both
> these projects are being inherited, the compilation and everything works
> fine, but there is this behavior which I am not able to comprehend, i.e.
> when I build the "project A" (which has dependency on B) the binary jar is
> generated as I expected with only the classes of Project A, but when I do
> a build of both the projects at the parent pom level the jar generated of
> the Project A also contains the classes of project B which doesn't make
> sense to me, I mean why are there binaries of the dependent project (i.e.
> B) is getting included in it.
> 
>  
> 
> Any feedback would be highly appreciated.

Normally I would say "no way", but you're in effect the second one I
remember on this list who reported such a behavior. I am quite sure all
devs would love to have a test case for this weird situation.

BTW: Do you use the xdoclet plugin in your projects?

Cheers,
Jörg


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