Conversation
|
@dscho @ctrueden - are you OK with this direction for the I like separating rules into profiles that are enabled by default, and can then be turned off if desired. I put the rules that conflict with Fiji into the Anything else from the core or extended ruleset you'd like to see? Should I be more granular in my profile setup, e.g. create several tiers of rules so that different chunks can be disabled or enabled..? If interested, you can test this by checking on this branch, installing it to your local repo, and changing a scijava project (e.g. |
For now I think not. Let's just have two levels: strict and loose. More than that starts being too complex, unless there is a specific need for it. |
Definitely:
|
|
@ctrueden I believe I addressed everything.. see anything you don't like? |
|
Thanks Mark! Looks awesome! I wrote one whitespace nitpick, and otherwise I am totally happy with it! |
Adds configuration specification for the maven-enforcer plugin and a default binding to the validate lifecycle phase. This will cause the maven-enforcer:enforce target to be run at the start of each maven build, using whichever rules are active. As configured, these rules are always on: * enforceBytecodeVersion * banCircularDependencies These rules are on by default but can be disabled by setting the system property: scijava.enforce.skip: * requireReleaseDebs * banDuplicateClasses * requireMavenVersion * requirePrerequisites * requireReleaseDeps As some of these properties may use maven and jvm versions, these have been converted to their own properties.
Enables the maven-enforcer plugin by default. Rules are separated into two categories: "loose" that are always on, and "strict" that are on when scijava.enforce.skip is not set. This allows us to disable certain rules, for example when we are building development versions of code.
|
FWIW I think that we should never, ever use the non-strict mode. Since switching to the release coupling strategy (in particular for |
|
@dscho I agree that we should only release things that pass the strict mode. But this configuration causes enforcer:enforce to run in every maven build.. if we ever want to develop against SNAPSHOTs, non-strict mode gives an easy way to build locally first. |
But would enforcer really require all dependencies of a SNAPSHOT to be on release versions? I thought that would only be enforced for release versions, not SNAPSHOT versions, of the artifact to build...? |
@dscho I would be very surprised if that rule didn't apply to SNAPSHOT builds. After all: we ourselves want all dependencies to be releases, always, except when developing topic branches which we plan to rewrite before merging. |
Yup. Enforcer doesn't care. If you take the current master of SJC and change its parent to pom-scijava 3.7-SNAPSHOT, it will not build without |
|
Okay, okay. I slouch corrected. |
Configures the maven-enforcer plugin to run during each build. Some rules can be disabled if necessary.