Issue Details (XML | Word | Printable)

Key: MULE-3808
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dirk Olmes
Reporter: Travis Carlson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Remove all top-level dependencies

Created: 09/Oct/08 08:57 AM   Updated: 02/Dec/08 01:20 PM
Component/s: Build: Libraries / Dependencies
Affects Version/s: 2.1.0
Fix Version/s: ITR11, 2.1.2

Time Tracking:
Not Specified

Labels:
User impact: Low


 Description  « Hide
There are currently a few libraries as top-level dependencies (i.e., in the root pom.xml): slf4j, log4j, junit
Dirk says this is a bad practice and may be causing problems with logging configuration, so these dependencies should be moved "down" in the tree of POMs.

 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Andrew Perepelytsya added a comment - 09/Oct/08 02:22 PM
Didn't we bubble them up there before? To avoid duplication. As a minimum we should just use dependencyManagement section if not setup for these.

Travis Carlson added a comment - 13/Oct/08 09:53 AM
The logging issue is a result of slf4j-jdk14 being in the top-level pom, which is the the slfj4-to-java.util-logging-bridge

Dirk Olmes added a comment - 19/Nov/08 07:59 PM
Another drawback of the toplevel, provided logging dependencies is brougth up by Ross:

When creating a new project based on Mule, the user needs to add the Logging JARs to their pop separately. This is a bit of a PITA, what is the reason for this?


Dirk Olmes added a comment - 19/Nov/08 08:01 PM
Oh, one more while we're at it: the pom of the transports subdir also contains dependencies which are then automatically inherited - bad.

Travis Carlson added a comment - 20/Nov/08 06:36 AM
The transports POM has the dependencies needed to support XML Namespaces and Functional Tests, would you propose repeating those for each and every transport? Isn't that the purpose of having a hierarchy of POMs?

Travis Carlson added a comment - 20/Nov/08 06:39 AM
> When creating a new project based on Mule, the user needs to add the Logging JARs to their pom separately.

Is this necessarily a bad thing? If Mule is being used as part of a larger app., logging for the app. is probably already configured somehow. What if the app. is using log4j and Mule drags in clogging, then the app. will have both on their classpath or they'll have to explicitly exclude the clogging from Mule (once they figure out what's going on).


Dirk Olmes added a comment - 21/Nov/08 02:34 AM

The transports POM has the dependencies needed to support XML Namespaces and Functional Tests, would you propose repeating those for each and every transport?

Maybe this is a valid case of dependencies on a parent POM then. But in most cases I've seen dependencies on "intermediate" poms, they've been just wrong in the past.


Dirk Olmes added a comment - 21/Nov/08 02:38 AM

Is this necessarily a bad thing? If Mule is being used as part of a larger app., logging for the app. is probably already configured somehow. What if the app. is using log4j and Mule drags in clogging, then the app. will have both on their classpath or they'll have to explicitly exclude the clogging from Mule (once they figure out what's going on).

I think that's not a valid point: Mule has a compile time dependency on the clogging APIs and there's no way that Mule could operate without it so mule-core may as well have the slf4j stuff as direct dependency since all transports and modules will use that, too.

As for the runtime dependency on log4j your point above may be valid, though. I still think it's better to have core depend on log4j directly and exclude that dependency in the rare cases we don't need it (the JCA bundle comes to mind).


Ross Mason added a comment - 01/Dec/08 03:08 AM
Travis, most of our customers and probably the same proportion of users, run mule as a stand alone application platform. This means that all those guys need to to add logging Jars to their projects which really is a bad thing. For the folks that have a conflict they can use the proper exclusion mechanism in Maven.

BTW, I think it makes sense for some libraries to be available in the parent POMs, there is no point bubbling up dependencies when they are needed by every child pom. However, I would expect that by pulling in the mule-core jar into my project would bring all its dependent jars. Right now it doesn't and that makes it seem broken. I would suggest putting logging in the mule-core pom and put a note on the wiki about how you can exclude them if you are embedding Mule and already have logging jars in your application.




Dirk Olmes added a comment - 02/Dec/08 08:36 AM

Dirk Olmes added a comment - 02/Dec/08 09:54 AM
Reopening this issue as the CI server complains about missing dependencies.





Dirk Olmes added a comment - 02/Dec/08 01:20 PM
The CI server just ran green on all tests - closing.