You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Patrick Bakker <pa...@vanbelle.com> on 2014/10/22 18:23:55 UTC

Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Hi,
I'm packaging up POI 3.11.beta2 for an OSGi application and I've
encountered a few issues.

First, it appears that the poi-ooxml-schemas-3.11-beta2.jar is missing some
class files. As I understand it from this FAQ (
http://poi.apache.org/faq.html#faq-N10025) this is is the slimmed down jar
not the full version. Since portions of the regular POI library access
these classes it would seem that they should be included in the slimmed
down version.

The missing classes are the classes:
org.openxmlformats.schemas.drawingml.x2006.main.STTextFontAlignType
org.openxmlformats.schemas.drawingml.x2006.main.STTextHorzOverflowType
org.openxmlformats.schemas.drawingml.x2006.main.STTextVertOverflowType

They seem to have an inner enum included in the stripped down jar but not
the base class itself.

I've successfully built an OSGi bundle of POI by copying these three class
definitions from the full ooxml-schemas-1.1.jar.

(There was a bug opened previously that seems related:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56282)

Another option I tried was just to include the entire ooxml-schemas-1.1.jar
instead of the subsetted poi-ooxml-schemas-3.11-beta2.jar. The problem with
that is the the poi-ooxml... jar is not strictly a subset. It adds in a
bunch of com.microsoft.schemas.office.x2006... packages that don't exist in
the full ooxml-schemas.1.1.jar. Would it it be possible to split this out
as its own jar OR include these same files in the full
ooxml-schemas-1.1.jar?

Finally, two minor points in terms of OSGi packaging. The
poi-ooxml-3.11-beta2.jar includes these some utilities in the main source
tree which have further dependencies and aren't needed for direct use of
the library:
org.apache.poi.extractor.*
org.apache.poi.util.OOXMLLite

I just delete these out of my OSGi packaging of the library which works
fine but it would be nice to have the package jars be split between core
library and utilities.

I hope that was all clear!
Thanks for all your work on this!

Patrick

Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 22 Oct 2014, Patrick Bakker wrote:
> First, it appears that the poi-ooxml-schemas-3.11-beta2.jar is missing 
> some class files. As I understand it from this FAQ ( 
> http://poi.apache.org/faq.html#faq-N10025) this is is the slimmed down 
> jar not the full version. Since portions of the regular POI library 
> access these classes it would seem that they should be included in the 
> slimmed down version.

We use the unit tests to work out what bits of the full jar to include. If 
there's no unit test touching a part, they won't be included

> The missing classes are the classes:
> org.openxmlformats.schemas.drawingml.x2006.main.STTextFontAlignType
> org.openxmlformats.schemas.drawingml.x2006.main.STTextHorzOverflowType
> org.openxmlformats.schemas.drawingml.x2006.main.STTextVertOverflowType

The fix would be for some kind community member to write a junit unit test 
that uses those classes, so they get auotmatically included in the next 
poi-ooxml-schemas jar :)

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Andreas Beeker <an...@gmx.de>.
On 24.10.2014 10:49, Nick Burch wrote:
> Let me know when it's all resolved, and I'll roll 3.11 beta 3 for a wider group to test it with 

After struggling with the release process (I had to locally insert a wagon-ssh dependency into the gpg maven plugin ...),
the jar is in the asf staging repo and the poi docs are updated.

Andi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Andreas Beeker <an...@gmx.de>.
On 24.10.2014 10:49, Nick Burch wrote:
> Use maven/ooxml-schemas.pom as a base, but it'll need some manual work to upload (since it has an independent numbering scheme to POI itself) 
OK, I've read [1] but shortly before I tried to upload the files, I thought I should recreate it once more, so I've deleted the ooxml-lib ... and now the ecma website is down :|
(no worries ... I've made a copy ...)

> I don't see why we can't have poi-ooxml-schemas be "all common ooxml and ooxml security bits", as long as the components + faq pages correctly reflect that!
I'll add the notes about the ooxml-security when it's online, so basically it's like before, either use poi-ooxml-schemas, which contain the security classes already,
or ooxml-schemas-1.1.jar and ooxml-security-1.0.jar

> Let me know when it's all resolved, and I'll roll 3.11 beta 3 for a wider group to test it with
Thank you ;)

Andi.

[1] http://www.apache.org/dev/publishing-maven-artifacts.html#ant-upload




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 23 Oct 2014, Andreas Beeker wrote:
> Originally it just contained the schema for encryption, but now it 
> contains also the signature schemas. How about calling it 
> ooxml-security-1.0.jar?

Looks fine to me

> I'm renaming it and trying to prepare the pom artifact.

Thanks. Use maven/ooxml-schemas.pom as a base, but it'll need some manual 
work to upload (since it has an independent numbering scheme to POI 
itself)

> But I think, it would be still practical, to keep the used classes in 
> the reduced poi-ooxml-schemas.

I don't see why we can't have poi-ooxml-schemas be "all common ooxml and 
ooxml security bits", as long as the components + faq pages correctly 
reflect that!


Let me know when it's all resolved, and I'll roll 3.11 beta 3 for a wider 
group to test it with

Thanks
Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Andreas Beeker <an...@gmx.de>.
On 23.10.2014 17:40, Nick Burch wrote:
> Is it currently ooxml-encryption-1.2.jar? If so, I'll look to add a maven pom for it when I prepare for 3.11 beta 3 


Originally it just contained the schema for encryption, but now it contains also the signature schemas. How about calling it ooxml-security-1.0.jar?

I'm renaming it and trying to prepare the pom artifact.

But I think, it would be still practical, to keep the used classes in the reduced poi-ooxml-schemas.

Andi


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 22 Oct 2014, kiwiwings wrote:
> In the build process there's an intermediate jar for the security xmlbeans
> classes, which is merged in the poi-ooxml.
> We probably should distribute it alongside ooxml-schemas.jar.

If it's required to run POI, then it does need to be distributed and in 
Maven central! Otherwise people won't be able to use that bit of Apache 
POI

Is it currently ooxml-encryption-1.2.jar? If so, I'll look to add a maven 
pom for it when I prepare for 3.11 beta 3

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by kiwiwings <ki...@apache.org>.
Patrick Bakker wrote
> The problem with that is the the poi-ooxml... jar is not strictly a
> subset. It adds in a
> bunch of com.microsoft.schemas.office.x2006... packages that don't exist
> in
> the full ooxml-schemas.1.1.jar. Would it it be possible to split this out
> as its own jar OR include these same files in the full
> ooxml-schemas-1.1.jar?

In the build process there's an intermediate jar for the security xmlbeans
classes,
which is merged in the poi-ooxml.
We probably should distribute it alongside ooxml-schemas.jar.
Although I've added xsds over the last two minor releases and
changed the (internal) version number accordingly, I think it's ok to ask
users to
always use the latest version ...



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Is-poi-ooxml-schemas-3-11-beta2-jar-missing-some-class-files-tp5716886p5716889.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Is poi-ooxml-schemas-3.11-beta2.jar missing some class files?

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 22 Oct 2014, Patrick Bakker wrote:
> I've successfully built an OSGi bundle of POI by copying these three class
> definitions from the full ooxml-schemas-1.1.jar.

Apache Tika ships an OSGi bundle, which seems to work well for the subset 
of Tika users who use OSGi. I don't see why we couldn't do the same for 
POI, including something similar to the unit tests that Tika has to ensure 
the bundle starts

> Finally, two minor points in terms of OSGi packaging. The
> poi-ooxml-3.11-beta2.jar includes these some utilities in the main source
> tree which have further dependencies and aren't needed for direct use of
> the library:
> org.apache.poi.extractor.*
> org.apache.poi.util.OOXMLLite

The extractors do get a fair bit of use, not as much as they used to now 
that Apache Tika is the main entry point for people wanting to do text 
extraction, but some

I don't see why we couldn't exclude org.apache.poi.util.OOXMLLite from the 
jars, since it's just used at POI build time

It might be good to open an enhancement in bugzilla for osgi packaging, 
and use that to track any work to get it into POI proper

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org