Bug 50067

Summary: Mark commons-logging and log4j as optional dependencies in pom.xml-s
Product: POI Reporter: Attila Király <kiralyattila.hu>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.7-dev   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Attila Király 2010-10-09 11:48:04 UTC
The current logging infrastructure in POI is not using commons-logging and log4j by default (as described in http://poi.apache.org/utils/logging.html all logging is disabled by default). So these dependencies should be marked as optional in the pom.xml-s because currently they are pulled in with poi into other projects however they are not needed.

The versions could be updated to their latest stable as well. Commons logging from 1.1 to 1.1.1 and log4j from 1.2.13 to 1.2.16.
Comment 1 Yegor Kozlov 2010-10-11 08:52:00 UTC
Thanks for the suggestion. I marked commons-logging and log4j as optional in r1021326. The upcoming POI-3.7 will include this fix.

We will consider upgrade to the latest versions of these libraries in POI-3.8. 

Yegor
Comment 2 Attila Király 2010-10-11 09:51:04 UTC
Thanks for the quick fix but this should be done in poi-scratchpad.pom file too.
Comment 3 Yegor Kozlov 2010-10-11 12:02:06 UTC
(In reply to comment #2)
> Thanks for the quick fix but this should be done in poi-scratchpad.pom file
> too.

Good catch, thanks.

Aren't these dependencies extra in poi-scratchpad.pom? I'm not a Maven expert and your expertise is greatly appreciated. 

I think poi-scratchpad should be able to access log4j and commons-logging via the dependency in the main pom. With this in mind, should we remove log4j and commons-logging from poi-scratchpad.pom?

Yegor
Comment 4 Attila Király 2010-10-11 12:07:43 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Thanks for the quick fix but this should be done in poi-scratchpad.pom file
> > too.
> 
> Good catch, thanks.
> 
> Aren't these dependencies extra in poi-scratchpad.pom? I'm not a Maven expert
> and your expertise is greatly appreciated. 
> 
> I think poi-scratchpad should be able to access log4j and commons-logging via
> the dependency in the main pom. With this in mind, should we remove log4j and
> commons-logging from poi-scratchpad.pom?
> 
> Yegor


You are right you can remove them. poi-scratchpad depends on poi so there is no need to redefine those dependencies.
Comment 5 Yegor Kozlov 2010-10-11 12:29:50 UTC
I removed log4 and commons-logging from poi-scratchpad.pom in r1021408

Yegor