In my src/main/webapp/WEB-INF I have a classes folder and a lib folder, which are not part of the source, but let me compile in place and immediately see the results of my changes in tomcat.

Now when I go to actually build a war using maven, I don't want that lib nor classes folder - I want the one which maven generates. In its default state, using version 2.0.2 of the war plugin, what happens is that you get both sets - in the lib folder for example, you get everything in my "dev" lib folder, plus any new snapshots or new dependencies maven might have downloaded. So usually you end up with duplicate jars. Not good.

How do you tell the war plugin to ignore src/main/webapp/WEB-INF/lib and classes (but not ignore the ones assembled during compilation)?

No matter what configuration I use, it always either ignores both sets, or includes both sets. Here is an example:

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    <excludes>**/WEB-INF/lib/*</excludes>
  </configuration>
</plugin>

or

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
<warSourceExcludes>WEB-INF/lib/*.*,WEB-INF/classes/**/*.*</ warSourceExcludes>
  </configuration>
</plugin>

Thanks,

J



--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca


Reply via email to