0

I have an images folder at src/main/webap/images which I'd like to exclude from my war. Here is my war plugin configuration:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
      <version>2.0</version>
      <warName>UNAB</warName>
      <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
      <webResources>
       <resource>
          <directory>src/main/webapp/</directory>
          <excludes>
            <exclude>images/*</exclude>
          </excludes>
        </resource>
      </webResources>
    </configuration>
  </plugin>

This isn't working. The images folder winds up in the war. Any troubleshooting tips for me?

morgancodes
  • 25,055
  • 38
  • 135
  • 187
  • 2
    possible duplicate of [maven2: excluding directory from WAR](http://stackoverflow.com/questions/3750189/maven2-excluding-directory-from-war) – Pascal Thivent Sep 28 '10 at 18:24
  • Have a look at the above linked question, it describes exactly why your solution doesn't work and how you should configure the plugin to get it working. – Pascal Thivent Sep 28 '10 at 18:25

1 Answers1

1

Try using <warSourceExcludes> instead of <webResources>; I had the same problem days ago and this worked for me.

bummi
  • 27,123
  • 14
  • 62
  • 101
Ismael Sarmento
  • 844
  • 1
  • 11
  • 22