maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject Re: How do you include classes from a WAR as a dependency?
Date Tue, 01 Dec 2009 15:52:23 GMT
On Tue, Dec 1, 2009 at 8:10 AM, laredotornado <> wrote:

> I'm using Maven 2.2.  I think I read somewhere that you cannot have a WAR as
> a dependency because maven doesn't know how to read the WEB-INF/classes
> directory.

This isn't Maven related, it's a Java thing.  Try compiling code at
the command line with a war on the classpath -- it won't work.

If something else depends on the classes in your war, then those
classes probably deserve to be in a separate module which creates a
jar.  Then both your war and the other project can depend on this jar.

You might also be interested in the 'archiveClasses' parameter of the
war plugin, which will make it create a jar instead of using


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message