此规则检查指定的文件列表是否存在并且在指定的大小范围内。
此规则支持以下参数:
示例插件配置:
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>enforce-file-size</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireFilesSize> <maxsize>10000</maxsize> <minsize>90</minsize> <files> <file>${project.build.outputDirectory}/foo.txt</file> <file>${project.build.outputDirectory}/foo2.txt</file> </files> </requireFilesSize> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>