You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pj.fanning" <fa...@yahoo.com> on 2018/07/02 19:59:23 UTC

adding extra classes to poi-ooxml-schemas jar

I made a change[1] to try to gat an extra generated class included in
poi-ooxml-schemas jar.
The latest nightly jars did not end up including it and I've tried local
builds but do not get it included either.
Would someone be able to review the change to see if I've made a mistake?

[1]
https://github.com/apache/poi/commit/31674ea13b5ad026a701802b60a8fce28748d17c



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

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


Re: adding extra classes to poi-ooxml-schemas jar

Posted by "pj.fanning" <fa...@yahoo.com>.
Thanks Dominik, that makes sense, that type erasure in Java collections would
mean that the CTPhoneticRun is not necessarily loaded.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

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


Re: adding extra classes to poi-ooxml-schemas jar

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

I think I know what happened, you added the class as generic in a List,
this is not resulting in usage of the class in the compiled bytecode!
Generics are a compile-time only construct and do not end up in the .class
file at all!

So it only works if you use the class directly, e.g. via the following:


// ensure that CTPhoneticRun is loaded by the ooxml test suite so that
it is included in poi-ooxml-schemas
CTPhoneticRun run = CTPhoneticRun.Factory.newInstance();
run.setEb(12);
assertEquals(12, run.getEb());


Then the files end up in the jar-file correctly.

Dominik.


On Tue, Jul 3, 2018 at 12:53 PM, pj.fanning <fa...@yahoo.com> wrote:

> Hi Dominik,
> I cleaned out the workspace on the DSL-1.8 build plan and ran a build and
> downloaded the bin zip from
> https://builds.apache.org/view/P/view/POI/job/POI-DSL-1.8/ws/build/dist/
> The CTPhoneticRun class is still missing from poi-ooxml-schemas jar though.
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

Re: adding extra classes to poi-ooxml-schemas jar

Posted by "pj.fanning" <fa...@yahoo.com>.
Hi Dominik, 
I cleaned out the workspace on the DSL-1.8 build plan and ran a build and
downloaded the bin zip from
https://builds.apache.org/view/P/view/POI/job/POI-DSL-1.8/ws/build/dist/
The CTPhoneticRun class is still missing from poi-ooxml-schemas jar though.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

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


Re: adding extra classes to poi-ooxml-schemas jar

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

The change looks good as far as I see, maybe you need to manually remove
the generated file under build/, just do a "rm -r build" locally and
rebuild.

In Jenkins you will need to "clear the workspace" (requires login, let us
know if you do not yet have that enabled).

Dominik.

On Mon, Jul 2, 2018 at 9:59 PM, pj.fanning <fa...@yahoo.com> wrote:

> I made a change[1] to try to gat an extra generated class included in
> poi-ooxml-schemas jar.
> The latest nightly jars did not end up including it and I've tried local
> builds but do not get it included either.
> Would someone be able to review the change to see if I've made a mistake?
>
> [1]
> https://github.com/apache/poi/commit/31674ea13b5ad026a701802b60a8fc
> e28748d17c
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>