Bug 787264 - Plugin dependencies; commons-logging and cobertura have wrong scope
Plugin dependencies; commons-logging and cobertura have wrong scope
Product: RHQ Project
Classification: Other
Component: Build System (Show other bugs)
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-02-03 13:20 EST by Elias Ross
Modified: 2014-06-03 16:41 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-03 16:41:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Elias Ross 2012-02-03 13:20:28 EST
I have a plugin with multiple dependencies.

I am using this to copy them to lib/


(BTW, this should probably be done for all plugins by default. It isn't really fun to have to include this for every plugin.)

Unfortunately RHQ pulls in cobertura and commons-logging.

I managed to fix cobertura issue:

diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 389b69c..abc9d0c 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -87,6 +87,13 @@
+         <scope>test</scope> <!-- for testing only -->
+      </dependency>
+      <dependency>
+         <groupId>commons-logging</groupId>
+         <artifactId>commons-logging</artifactId>
+         <version>${commons-logging.version}</version>
+         <scope>provided</scope> <!-- by RHQ container -->

but I can't seem to fix the logging dependency issue. The logging dependency should be 'provided' not 'compile'...
Comment 1 Mike Foley 2012-02-06 12:02:35 EST
per bz triage (asantos, ccrouch, mfoley. loleary)
Comment 2 Ian Springer 2012-06-06 10:48:22 EDT
I have not had any success using the copy-dependencies goal. It appears to be buggy and the way scopes are specified is very unintuitive.

I recommend using the copy-libs goal instead and explicitly specifying the jars you want to include, which is what we do in all the core plugins. For example, from the as7 plugin:




Defining an rhq-agent-plugin Maven packaging type that encapsulates things like copying runtime deps into the lib dir and validating the plugin descriptor is a good idea and something I have been wanting to do for a while. Can you create a separate BZ for that?
Comment 3 Elias Ross 2012-07-16 14:36:51 EDT
I created

Bug 840634 - Define an rhq-agent-plugin Maven packaging type

This bug may be marked as duplicate or closed.
Comment 4 Elias Ross 2014-06-03 16:41:47 EDT
I don't think this is an issue anymore.

Note You need to log in before you can comment on or make changes to this bug.