Hi, the Enforcer Plugin is usually executed in the "validate" phase and requires resolution of dependencies. This constellation can cause build failures.
Consider an Enforcer-enabled multi-project build with a parent and two modules A and B where B has a dependency on A such that the reactor build order will be: 1. Parent 2. Module A 3. Module B Now assume the user has just (manually) switched project versions to say "1.0" in order to perform a release. In other words, the local repository does not contain artifacts for module-a:1.0 and module-b:1.0 yet. The same applies to a freshly created project whose "1.0-SNAPSHOT" artifacts have never been build before. In such a situation, executing any lifecycle phase before "install" will cause the build to fail because the dependency resolution for module B triggered by the Enforcer cannot find the artifact for module A which hasn't been built yet.
From a user's point of view, this is odd: The build lifecycle is supposed to
be a sequence of phases so if execution of phase n is possible why not phase 0, ..., n-1? While it will not provide a general cure for this oddity, I propose the introduction of another Mojo annotation like "@requiresDependencyCollection" that does not retrieve JARs but only their metadata. The metadata could then be retrieved from the reactor projects instead of a repository so I believe this could at least help all those plugins that just do artifact metadata analysis. Regards, Benjamin Bentmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
