Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 1016 - Jacorb (core) pom exposes slf4j-jdk14 as a compile time dependency
Summary: Jacorb (core) pom exposes slf4j-jdk14 as a compile time dependency
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: Configuration and Build (show other bugs)
Version: 3.6.1
Hardware: All All
: P5 normal
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2015-08-19 05:42 UTC by David Gibbs
Modified: 2015-10-19 08:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Gibbs 2015-08-19 05:42:07 UTC
The Jacorb (core) pom exposes slf4j-jdk14 as a compile dependency.
This requires exclusion of slf4j-jdk14 in dependent projects.
slf4j-jdk14 is not a compile dependency.

mvn co-ordinates

<dependency>
  <groupId>org.jacorb</groupId>
  <artifactId>jacorb</artifactId>
  <version>3.6.1</version>
</dependency>

Dependencies

<dependencies>
   <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-jdk14</artifactId>
</dependency>
<dependency>
  <groupId>org.jacorb</groupId>
  <artifactId>jacorb-omgapi</artifactId>
</dependency>
</dependencies>
Comment 1 Nick Cross 2015-08-21 17:21:15 UTC
I think it would be feasible to change it to runtime scope (https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope) (and suitably alter the demos to pass the correct classpath).

Would this satisfy your use-case?
Comment 2 Nick Cross 2015-10-15 04:33:25 UTC
Fixed by 996859447b02e425317184a463f62baa908051ab
Comment 3 David Gibbs 2015-10-15 05:03:08 UTC
Hi Nick,

very sorry I did not see your comment earlier, much earlier.

I think that slf4j-jdk14 is not a runtime dependency of jacorb. It's a runtime dependency of the example applications. 

If the scope is "runtime" then applications using jacorb will have a transitive runtime dependency on slf4j-jdk14 and still require the exclusions. slf4j complains when runtime conflicts arise with other logging implementations.

If the tests depend on the slf4j-jdk14 logging implementation then it would be reasonable for it to be of scope "test".

I would suggest 
* making slf4j-jdk14 of scope "test" or removing it from dependency management 
* adding slf4j-jdk14 with scope "runtime" to the example applications"

thanks
Dave
Comment 4 Nick Cross 2015-10-15 06:20:18 UTC
Ok fiar point, there would be a conflict:

> I would suggest 
> * making slf4j-jdk14 of scope "test" or removing it from dependency management 
> * adding slf4j-jdk14 with scope "runtime" to the example applications"

How about removing slf4j-jdk14 from core/services and adding it as a dependency to the demos/tests?
Comment 5 Nick Cross 2015-10-15 11:05:53 UTC
SHA 0e85fb590ab53545ede629387c8fb290be663dab
Comment 6 David Gibbs 2015-10-19 08:42:59 UTC
Hi Nick , I submitted a Pull request with very minor suggested differences.