此规则检查是否设置了指定的环境变量。
此规则支持以下参数:
示例插件配置:
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>enforce-environment-variable-is-set</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireEnvironmentVariable> <variableName>the_name_you_wish_to_be_checked</variableName> </requireEnvironmentVariable> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>