Para ello utilizaremos el plugin maven-sizewatch-plugin de la siguiente manera:
<plugin>
<groupid>agimatec.maven.plugins
</groupid>
<artifactid>maven-sizewatch-plugin</artifactid>
<version>1.0</version>
<executions>
<execution>
<id>verify-war-size
</id>
<phase>
verify
</phase>
<goals>
<goal>
verifysize
</goal>
</goals>
<configuration> <failonerror>true</failonerror> <maxsize>777777</maxsize> <artifact>${project.build.directory}/${warName}.war</artifact> </configuration> </execution> </executions>
</plugin>
Comentarios