Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-alpha-3
-
None
-
Patch
Description
When I setup a project to use the enforcer plugin, I would like to setup the requireReleaseDeps rule. However, while I am in "snapshot" mode with my project, I'm not that concerned about whether that project depends on snapshots. For example, I may have a small suite of projects which are being developed at the same time. They may also share a common parent. (Just like the maven enforcer projects do) Especially in the case where I place the maven enforcer plugin configuration in that parent pom, it wouldn't make sense for me to have to "comment out" the requireReleaseDeps rule during my snapshot development, only to have to switch it back at release time. Rather, what I want to express is "enforce the requireReleaseDeps rule, but only when I'm a release".
The pom snippet would look like
<requireReleaseDeps> <onlyWhenRelease>true</onlyWhenRelease> <searchTransitive>true</searchTransitive> </requireReleaseDeps>
I have attached a patch that shows what I'm thinking, and the updated test case to show that it works as expected.