You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rick Mann <rm...@latencyzero.com> on 2005/01/11 03:31:56 UTC

Handling conflicting JAR version requirements

Hi. I'm fairly new to Maven, but over the weekend I got it to build my 
torque/struts-based webapp, and I'm hooked. Now I'm trying to sell the 
concept at work, and I've come up with a situation that I'm not sure 
how to handle.

Let's say I'm writing a struts webapp, and that both struts and my app 
depend on foo.jar. For the sake of argument, let's also say I'm 
building struts from source as well. Now say that my struts work and my 
webapp work depend on having different versions of the same foo.jar.

I know how maven handles this in a build situation, and it seems to 
work great.

<aside>
Hmm. I realize that what I'm about to ask strays off-topic, as it is 
not specific to maven but a much more general Java situation. Forgive 
me for asking anyway. Is there a concise, authoritative reference that 
explains this? (Also, feel free to tell me to shut up).
</aside>

Now I want to deploy my webapp with my struts build, and maven can do 
that, too. But what happens when it tries to put the two versions of 
foo.jar in the WEB-INF/lib directory? When the container loads my 
application, its classloader is going to load both JARs. What happens? 
Last one loaded wins? First? Unpredictable?

I really appreciate any light you can shed. Thank you.



-- 
Rick


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