Red Hat Bugzilla – Full Text Bug Listing
|Summary:||cobetura and ant are now dependencies which causes runtime errors|
|Product:||[Other] RHQ Project||Reporter:||John Mazzitelli <mazz>|
|Component:||Build System||Assignee:||Filip Drabek <fdrabek>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Mike Foley <mfoley>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2013-09-02 03:23:50 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
|Bug Blocks:||625146, 663236|
Description John Mazzitelli 2010-12-15 21:26:21 EST
In the root pom.xml, there is this dependency: <dependency> <groupId>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <version>184.108.40.206</version> </dependency> Notice it is using the default scope (compile). This causes coberture and its dependencies (ant 1.7) to get packaged in the RHQ Server in several places (the installer war and the ear itself are two such places - but it is in several more). This causes problems. One problem showed itself in the bundle subsystem (the bundle subsystem has a server side ant bundle plugin that has its own Ant library (v1.8). But because the root classloader now has 1.7 inside it, it breaks the bundle plugin - see bug 663236 for more). Since cobertura is only needed during the testing phase, there is no need to package its jar and its ant dependency in the RHQ Server (and as we've seen, we can't have ant in the server or errors occur). Therefore, cobertura needs to be in the test scope via <scope>test</scope>: <dependency> <groupId>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <version>220.127.116.11</version> <scope>test</scope> </dependency> NOTE: the git commit that introduced the bug is: 9972429183bee20d1a973eae55c1c9b75832b546 I git checked out that commit, added the one <scope> line to the root pom.xml and ran a test to confirm this does indeed fix the runtime error in the bundle subsystem. However, I have no idea if this breaks the cobertura tests, or maven test builds. However, because this is a blocker for us (it breaks the bundle subsystem - you can't create new bundles in the system without this fix; this is blocking me from doing more bundle work), we need to do this now. Someone will have to go in and verify that cobertura still works in the test infrastructure and if it doesn't, fix it. I am using maven 2.2.1 when building the server for these tests. It appears that the test scope was not included possibly due to some maven 3 bug (as the commit message for sha 997242 indicates: "test scope removed because of maven3 "). If this is true, we will need to work around that bug some other way or not allow maven 3 to be used for our builds.
Comment 1 John Mazzitelli 2010-12-15 22:23:54 EST
i put the cobertura scope at test - git commit b37f3e2278ca08f5eddb43e275e300642fa9d850 someone more familiar with cobertura needs to make sure this doesn't break anything.
Comment 2 John Mazzitelli 2010-12-15 22:27:20 EST
assigning Filip to look at this since he is most familiar with the cobertura setup in the build.
Comment 3 Filip Drabek 2011-01-12 10:56:00 EST
Cobertura task works with maven 2.2.1.
Comment 4 Mike Foley 2011-05-24 10:38:55 EDT
verified through general testing of the build. agree on the approach.
Comment 5 Heiko W. Rupp 2013-09-02 03:23:50 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.