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
  • 24,623
  • 37
  • 132
  • 186

1 Answers1

1

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

bummi
  • 26,839
  • 13
  • 60
  • 97
Ismael Sarmento
  • 742
  • 10
  • 21