Last active
August 29, 2015 14:23
-
-
Save banterCZ/76232e9c0757de16c397 to your computer and use it in GitHub Desktop.
How to keep war clean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<version>1.4</version> | |
<executions> | |
<execution> | |
<id>enforce-banned-dependencies</id> | |
<goals> | |
<goal>enforce</goal> | |
</goals> | |
<configuration> | |
<rules> | |
<bannedDependencies> | |
<excludes> | |
<exclude>org.hibernate</exclude> | |
<exclude>org.slf4j:slf4j-api:jar:*:compile</exclude> | |
</excludes> | |
</bannedDependencies> | |
</rules> | |
</configuration> | |
</execution> | |
<execution> | |
<id>enforce-file-size</id> | |
<goals> | |
<goal>enforce</goal> | |
</goals> | |
<phase>package</phase> | |
<configuration> | |
<rules> | |
<requireFilesSize> | |
<!-- size in bytes --> | |
<maxsize>7000000</maxsize> | |
<files> | |
<file>${project.build.directory}/${project.build.finalName}.war</file> | |
</files> | |
</requireFilesSize> | |
</rules> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment