You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Attila Ravai <at...@yahoo.com> on 2007/01/30 21:48:45 UTC

dependency of jar included in war?

Hi,

I have a war file which has a dependency on my project, which is a jar. The jar file itself has a lot of dependencies (like oracle classes.jar). When building the war file, all I get in the web-inf/lib is what I specified in the war dependency, which is myproject.jar. However the classes.jar it never is added to the war, so when trying to load the app, I get an classnotfound exception.

Is there a way to have the war include the jar files dependencies? I would hate to duplicate the dependencies in the war pom. I cannot create a parent module, as they are two different projects.

thanks
Atti

 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

Re: dependency of jar included in war?

Posted by Siegfried Goeschl <si...@it20one.at>.
Hi Atti,

currently a WAR does not participate in the dependency inheritance 
mechanism. What you could do since your WAR depends on a single JAR is 
to add the JAR as additional dependency.

This is of course a hack but not too ugly.

Cheers,

Siegfried Goeschl

Attila Ravai wrote:
> Hi,
> 
> I have a war file which has a dependency on my project, which is a jar. The jar file itself has a lot of dependencies (like oracle classes.jar). When building the war file, all I get in the web-inf/lib is what I specified in the war dependency, which is myproject.jar. However the classes.jar it never is added to the war, so when trying to load the app, I get an classnotfound exception.
> 
> Is there a way to have the war include the jar files dependencies? I would hate to duplicate the dependencies in the war pom. I cannot create a parent module, as they are two different projects.
> 
> thanks
> Atti
> 
>  
> ---------------------------------
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.

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