More on this subject, the good news is that I was able to reproduce the issue. On Linux, the builds fails with m2.2.1 on every version of jdk from 1.5 to 1.8 inclusive.
After analysis, the problem seems to come from *project.getArtifacts() *[1] that returns *only direct dependencies with m2* (and correctly also the transitive one with m3). So, the question is: is this something known? From a quick search on Google, it seems something quite common, but I didn't find the definitive answer on what to do to make the code work correctly with both versions (btw, see other thread of Mirko about supporting m2 or not). Anyone having some insight or pointers about that difference in behaviour? Thanks a lot. [1] https://fisheye.codehaus.org/browse/mojo/trunk/mojo/extra-enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanCircularDependencies.java?hb=true#to50<https://fisheye.codehaus.org/browse/mojo/trunk/mojo/extra-enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanCircularDependencies.java?hb=true> 2013/3/16 Baptiste MATHUS <[email protected]> > Thanks for testing with m2.2.1. > As for the try/finally, thanks and sorry. > I'm usually shouting about that kind of resource mismanagement when I see > it. > > Though I had already reviewed some of the sonar and checkstyle violations, > I guess I should do that a bit more carefully, before trying to release a > third time :-). > I'll also try to understand where the bamboo issue comes from. But as you > say, having access to the build as in Jenkins workspace would certainly > greatly help. > > Anyway, let's cancel the vote at least for the file leak. That will have > been a great first time :-). I hope I will finally be able to make it > through. > > Thanks > > > 2013/3/15 Mirko Friedenhagen <[email protected]> > >> Hello Baptiste, >> >> I just installed Maven 2.2.1 on my machine (OS X 10.8.3, JDK 1.7.0_17) >> and the CIRCULAR IT is failing (the build result is SUCCESSFUL :-)). >> >> Regards Mirko >> >> >> On Fri, Mar 15, 2013 at 10:51 PM, Mirko Friedenhagen >> <[email protected]> wrote: >> > Hello Baptiste, >> > >> > sorry for spoiling the fun again :-(. I just test-installed sonar on >> > my machine and let it inspect extra-enforcer-rules, one thing standing >> > out is a leaking file handle, because new JarFile( f ) already opens >> > the file, but it is never closed. While this need not be a problem >> > (because the number of dependencies is probably mostly small), in some >> > circumstances enforcer:enforce might be invoked several times because >> > of forked lifecycles, there may be reactor projects with a lot of >> > modules *and* the files stay open during the whole maven session. I >> > just fixed this with >> > https://fisheye.codehaus.org/changelog/mojo?cs=18023. >> > >> > Side note: by chance I stumbled across >> > https://bamboo-ci.codehaus.org/browse/MOJO-MEXTRAENFORCERRULES and all >> > recent builds are failing, though on Jenkins >> > http://huschteguzzel.de/hudson/job/extra-enforcer-rules/ and my >> > private and office workstation I have no problem running mvn clean >> > install site on the trunk. >> > >> > >> https://bamboo-ci.codehaus.org/browse/MOJO-MEXTRAENFORCERRULES-JOB1-30/log >> > shows the CIRCULAR integration test is failing, however I do not know >> > how to look into the workspace as on Jenkins. From the output it >> > seems, Bamboo is running Maven 2, however, maybe that is the problem? >> > >> > Regards Mirko >> > >> > On Fri, Mar 15, 2013 at 9:28 PM, Baptiste Mathus <[email protected]> >> wrote: >> >> Hi, >> >> >> >> I'd like to release version 1.0-alpha-4 of the extra-enforcer-rules >> project. >> >> Note that this is the second try. So, please think about deleting your >> local >> >> version if you already tried the previous release attempt. >> >> >> >> Extra Enforcer Rules is a project containing extra rules for Apache >> Maven's >> >> Enforcer Plugin. >> >> >> >> We solved 7 issues: >> >> >> https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11062&version=18450 >> >> >> >> There are still a couple of issues left in JIRA: >> >> >> https://jira.codehaus.org/issues/?jql=project%20%3D%20MOJO%20AND%20component%20%3D%20extra-enforcer-rules%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20due%20ASC%2C%20priority%20DESC%2C%20created%20ASC >> >> >> >> Staging Repositories: >> >> General: https://nexus.codehaus.org/content/groups/staging/ >> >> Exclusive: >> >> https://nexus.codehaus.org/content/repositories/orgcodehausmojo-032/ >> >> >> >> (Staging) Site: >> >> http://mojo.codehaus.org/extra-enforcer-rules/ >> >> >> >> SCM Tag: >> >> https://svn.codehaus.org/mojo/tags/extra-enforcer-rules-1.0-alpha-4/ >> >> >> >> Note that this version includes two new rules: >> >> * enforcerBytecodeVersion : rule to check that bytecode of >> dependencies is >> >> not higher than expected >> >> * banCircularDependencies : rule to prevent having circular >> dependencies >> >> >> >> [ ] +1 >> >> [ ] +0 >> >> [ ] -1 >> >> >> >> The vote is open for 72 hours and will succeed by lazy consensus. >> >> >> >> Cheers >> >> >> >> -- >> >> Baptiste >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
