Reputation: 11
I'm attempting to exclude all of the js/backbone directories with the exception of the libs directory from my war file. My pom file entry is as follows:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<packagingExcludes>
%regex[js/backbone/[^l].*/]
</packagingExcludes>
</configuration>
</plugin>
Unfortunately, no directories are being excluded. Any help will be greatly appreciated!!
Upvotes: 1
Views: 1964
Reputation: 89557
Try to use a negative lookahead (?!..)
to exclude the lib directory:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<packagingExcludes>
%regex[js/backbone/(?!libs/).*]
</packagingExcludes>
</configuration>
</plugin>
(?!libs/)
means not followed by libs/
Upvotes: 2