Bug 663517

Summary: cobetura and ant are now dependencies which causes runtime errors
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Build SystemAssignee: Filip Drabek <fdrabek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: low    
Version: 4.0.0.B02   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 07:23:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 625146, 663236    

Description John Mazzitelli 2010-12-16 02:26:21 UTC
In the root pom.xml, there is this 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>:


NOTE: the git commit that introduced the bug is:


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-16 03:23:54 UTC
i put the cobertura scope at test - git commit 


someone more familiar with cobertura needs to make sure this doesn't break anything.

Comment 2 John Mazzitelli 2010-12-16 03:27:20 UTC
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 15:56:00 UTC
Cobertura task works with maven 2.2.1.

Comment 4 Mike Foley 2011-05-24 14:38:55 UTC
verified through general testing of the build.  agree on the approach.

Comment 5 Heiko W. Rupp 2013-09-02 07:23:50 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.