此规则检查此 pom 或其父项是否未定义存储库。
此规则支持以下参数:
示例插件配置(显示一些默认值,可以跳过默认值):
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>enforce-no-repositories</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireNoRepositories> <message>Best Practice is to never define repositories in pom.xml (use a repository manager instead)</message> </requireNoRepositories> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>