This rule checks the dependencies and fails if any snapshots are found.
The following parameters are supported by this rule:
Sample Plugin Configuration:
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.4.1</version> <executions> <execution> <id>enforce-no-snapshots</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireReleaseDeps> <message>No Snapshots Allowed!</message> </requireReleaseDeps> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>
Includes/Excludes Plugin Configuration:
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.4.1</version> <executions> <execution> <id>enforce-no-snapshots</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireReleaseDeps> <message>No Snapshots Allowed!</message> <excludes> <exclude>org.apache.maven:maven-core</exclude> <exclude>org.apache.maven.plugins:*</exclude> </excludes> </requireReleaseDeps> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>