あなたがプラグインを設定することを要求ルールで、「検証」フェーズの間に実行するためにEnforcerプラグイン(docs)を設定でき、設定は次のようなものになります。
を
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>verify</phase>
<configuration>
<rules>
<requireProperty>
<property>tomcat.manager.url</property>
<message>You must set a tomcat manager url</message>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
プラグインは検証フェーズでのみ実行されるため、そのフェーズに達したビルドを実行している場合を除き、チェックは行われません。