Hi Baptiste,
you're hitting the result of the changes due to MENFORCER-42[1]
Up until 1.2 the dependencies were resolved instead of calculated.
So if you run 'mvn validate' you can't use the results of the reactor,
since those files aren't available yet. So the build will fail or it will
use artifacts from an older run. IMO both are wrong.
The EnforceBytecodeVersion is an example of a rule which needs to be bound
after compilation.
My suggestion is to rewrite the rule and let it depend on a DependencyTree
instead of a DependencyGraph[2]
I noticed that the extra-enforcer-rules depend on the (standard)
enforcer-rules. I think that could be improved by extracting abstract
classes to a separate module. That way we have a better separation on
concerns. That would be something for a next release.
I'm not going to cancel the vote for this reason.
Robert
ps. Thanks for testing!
[1] http://jira.codehaus.org/browse/MENFORCER-42
[2] http://maven.apache.org/shared/maven-dependency-tree/
Op Sun, 23 Jun 2013 11:45:30 +0200 schreef Baptiste MATHUS
<bmat...@batmat.net>:
-0.9 (non binding).
I just tested on a local project, codehaus mojo EnforceBytecodeVersion
fails with an NPE with m-enforcer-p 1.3 but correctly thows an
EnforcerRuleException with 1.2.
That is, as I am the one who wrote that rule, that's perfectly possible
I'm
doing something stooopid in the code that gets revealed with this new
enforcer-p version.
I've pasted the stack trace here: http://pastebin.com/3sHY0Fvf
After a quick dive in the code, from the stack trace, seems like the
following code:
*private boolean isBadArtifact( Artifact a )** throws
EnforcerRuleException*
* {*
* File f = a.getFile();*
* if ( !f.getName().endsWith( ".jar" ) )*
* {*
fails because the returned File is null.
Is this something that should always work. If you feel this is correct
code, then just let me know and I'll file the corresponding JIRA.
Cheers
2013/6/23 Olivier Lamy <ol...@apache.org>
+1
2013/6/22 Robert Scholte <rfscho...@apache.org>:
> Hi,
>
> We solved 15 issues:
>
http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11530&version=19011
>
> There are still a couple of issues left in JIRA:
>
http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=11530&status=1
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-056/
>
https://repository.apache.org/content/repositories/maven-056/org/apache/maven/enforcer/enforcer/1.3/enforcer-1.3-source-release.zip
>
> Staging site:
> http://maven.apache.org/enforcer-archives/enforcer-LATEST/
>
> Guide to testing staged releases:
> http://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
--
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org