I need to process an Excel spreadsheet (version 2007+...xlsx) in one of my 
Camel routes running in Servicemix.  I plan to do so with Apache Poi.

I added the existing apache poi component to my Servicemix instance, and added 
a dependency on the same version to my project pom.  Unfortunately, the 
existing poi SMX component does not include the Poi "ooxml" library, which is 
necessary to process the 2007+ spreadsheet format (Office XML).

Also, version 3.6 of Poi (on which the current component is based) is a little 
out of date...the current release is 3.7.

So my plan is to build a new OSGi bundle that uses the 3.7 version and includes 
all of Poi (including the ooxml support).  I've spent the better part of 
several hours trying to coerce the existing component pom 
(http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/poi-3.6/pom.xml) 
into working for Poi 3.7...I made the changes that seemed obvious.  When I 
attempt to install the resulting bundle, karaf complains about a missing 
requirement junit.framework.  When I run the headers command on the bundle, I 
see several packages in red, including dom4j, junit.framework, junit.textui, 
and the org.openxmlformats.* packages.

Upon further digging, I noticed that there is a class in Poi 
(org.apache.poi.util.OOXMLLite) that has a dependency on junit, so that's 
probably what's causing the red import...I've looked at the source for this 
class, and nothing else depends on it, so if I can figure out how to exclude it 
from the bundle perhaps the junit dependency problem would go away.

As for the org.openxmlformats.* dependencies...those baffle me, since I am 
including those packages in the uber-jar with shade, and have in fact verified 
that they get included.

I've attached the pom.  Any assistance would be most appreciated...

Thanks.
--Scott

Attachment: pom.xml
Description: pom.xml

Reply via email to