You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric wais <wa...@gmail.com> on 2010/01/22 10:16:39 UTC

Jar file source files compiling

Hi,

I have a jar file that is a dependency on a project. This jar contains
source files as well. The problem is that the source files are being
compiled (when running clean install) and put in the target directory. Is
there anyway to exclude the class files as these are now being included as
part of the war file, so I effectively have duplicate class files?

Regards.

Re: Jar file source files compiling

Posted by Wayne Fay <wa...@gmail.com>.
> I have a jar file that is a dependency on a project. This jar contains
> source files as well. The problem is that the source files are being
> compiled (when running clean install) and put in the target directory. Is
> there anyway to exclude the class files as these are now being included as
> part of the war file, so I effectively have duplicate class files?

This is a fun "bug" that we see on this list a couple times a year.
Most recent was this post if you check the archives on Nabble:
date: Tue, Jan 12, 2010 at 4:41 PM
subject: Re: Maven compile puts javax.servlet.* in target/classes

It happens when you've got source files IN one of your dependency jars
as you've already discovered. And its not a Maven error -- this is
simply the behavior of the java compiler. I'm pretty sure you're using
GWT (gwt-user-x.y.z.jar) as a dependency in your project, right? And
you're probably running into collisions on javax.servlet.* classes?
Read the archived post in Nabble for workarounds etc.

Wayne

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