You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.com> on 2017/05/26 13:53:30 UTC

JAXB on Android (was: Google Summer of Code projects accepted)

Le 25/05/2017 à 14:22, Sisinda Dinusha a écrit :

> Yes, they support GPL / CDDL dual license.
>
In my understanding of [1], [2] and [3], we are allowed to use stax-api
and jaxb-api under CDDL license provided that:

  * We do not modify the source code (or at least not in the Apache SIS
    project).
  * We redistribute only the binaries (e.g. as Maven dependencies), not
    the source.

If I'm understanding right, fasterxml is under Apache 2 license, is that
right? If so, then I think there is no objection in trying to use it on
Android if it works.


> Yes SimpleXML would be only on Android branch. xmlpullparser provided with
> Android does not support annotations and will have to write much longer codes.

Understood. Then the initial proposal (fasterxml with JAXB annotations
under CDDL license) would be nice if it works. Otherwise SimpleXML seems
fine to me.

    Martin



Re: JAXB on Android

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Le 26/05/2017 à 15:53, Martin Desruisseaux a écrit :

> In my understanding of [1], [2] and [3], we are allowed to use
> stax-api and jaxb-api under CDDL license provided that (...snip...):
>
Sorry, I forgot to add the links:

[1] http://apache.org/legal/resolved.html#category-b
[2] https://issues.apache.org/jira/browse/LEGAL-121
[3] https://issues.apache.org/jira/browse/LEGAL-264



Re: JAXB on Android

Posted by Sisinda Dinusha <si...@gmail.com>.
On Tue, Jun 6, 2017 at 7:22 PM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> Is the aalto-xml library needed only at runtime, or is it needed
> at compile-time too?
>

It is needed only at runtime.

Re: JAXB on Android

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Sisinda

Thanks for the report. I think that using original JAXB implementation
under CCDL license is fine, and would probably be the easiest approach
for us. Is the aalto-xml library needed only at runtime, or is it needed
at compile-time too?

    Martin


Le 06/06/2017 à 15:03, Sisinda Dinusha a écrit :

> Hello Martin,
>
> Sorry for the delay. While I was working on the org.apache.sis.xml package,
> I tried jaxb unmarshalling again and I
> managed to make it work by additionally including aalto-xml library (Apache
> license 2.0) from fasterxml project.
> So is it ok to keep the original jaxb implementation in the SIS library as
> there are no
> conflicts with the licenses?



Re: JAXB on Android

Posted by Sisinda Dinusha <si...@gmail.com>.
Hello Martin,

Sorry for the delay. While I was working on the org.apache.sis.xml package,
I tried jaxb unmarshalling again and I
managed to make it work by additionally including aalto-xml library (Apache
license 2.0) from fasterxml project.
So is it ok to keep the original jaxb implementation in the SIS library as
there are no
conflicts with the licenses?

Re: JAXB on Android

Posted by Sisinda Dinusha <si...@gmail.com>.
On Thu, Jun 1, 2017 at 1:23 PM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> I think you have a
> GitHub repository for this work, is it right? (sorry if you already
> provided the link and I forgot it)
>

Yes, here it is https://github.com/dinush/sis
I will commit to a new branch named Android2

Re: JAXB on Android

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Thanks, all the information you provided looks good. I think you have a
GitHub repository for this work, is it right? (sorry if you already
provided the link and I forgot it)

    Martin


Le 01/06/2017 à 08:30, Sisinda Dinusha a écrit :

> * It is not a modified version. I included dependencies from maven
> repository.
> These are the packages included,
> 1. javax.xml.bind/jaxb-api
> 2. javax.xml.stream/stax-api
> 3. javax.activation/activation
> 4. com.sun.xml.bind/jaxb-core
> 5. com.sun.xml.bind/jaxb-impl
>
> * I used FasterXML xml object mapper and FasterXML jaxbAnnoationModule
> together with javax.xml.bind.annotation classes
>


Re: JAXB on Android

Posted by Sisinda Dinusha <si...@gmail.com>.
On Mon, May 29, 2017 at 3:23 PM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> * In the first case, you tested with JAXB API together with JAXB
>     Reference Implementation (RI), or was it a modified version of JAXB RI?
>   * In the second case, you tested with JAXB API (annotations and
>     adapters) together with FasterXML as an implementation of that API?
>

Hello Martin

* It is not a modified version. I included dependencies from maven
repository.
These are the packages included,
1. javax.xml.bind/jaxb-api
2. javax.xml.stream/stax-api
3. javax.activation/activation
4. com.sun.xml.bind/jaxb-core
5. com.sun.xml.bind/jaxb-impl

* I used FasterXML xml object mapper and FasterXML jaxbAnnoationModule
together with javax.xml.bind.annotation classes

Re: JAXB on Android

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Sisinda

Thanks for the update. Just to clarify my understanding:

  * In the first case, you tested with JAXB API together with JAXB
    Reference Implementation (RI), or was it a modified version of JAXB RI?
  * In the second case, you tested with JAXB API (annotations and
    adapters) together with FasterXML as an implementation of that API?

In any case, your experiment sound encouraging!

    Martin


Le 27/05/2017 à 09:40, Sisinda Dinusha a écrit :

> Ok, I have created a simple Android app with 2 JAXB annotated classes. I
> was able to marshal those classes with JAXB marshaller. But unmarshalling
> generated errors (org.xml.sax.SAXNotRecognizedException). Then I changed to
> fasterxml with existing JAXB annotations and it worked for both marshalling
> and unmarshalling with similar xml output provided by JAXB. So I will try
> to find a solution for the JAXB unmarshalling error, and in case it failed,
> I will implement with fasterxml.


Re: JAXB on Android (was: Google Summer of Code projects accepted)

Posted by Sisinda Dinusha <si...@gmail.com>.
Ok, I have created a simple Android app with 2 JAXB annotated classes. I
was able to marshal those classes with JAXB marshaller. But unmarshalling
generated errors (org.xml.sax.SAXNotRecognizedException). Then I changed to
fasterxml with existing JAXB annotations and it worked for both marshalling
and unmarshalling with similar xml output provided by JAXB. So I will try
to find a solution for the JAXB unmarshalling error, and in case it failed,
I will implement with fasterxml.

On Fri, May 26, 2017 at 7:23 PM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> Le 25/05/2017 à 14:22, Sisinda Dinusha a écrit :
>
> > Yes, they support GPL / CDDL dual license.
> >
> In my understanding of [1], [2] and [3], we are allowed to use stax-api
> and jaxb-api under CDDL license provided that:
>
>   * We do not modify the source code (or at least not in the Apache SIS
>     project).
>   * We redistribute only the binaries (e.g. as Maven dependencies), not
>     the source.
>
> If I'm understanding right, fasterxml is under Apache 2 license, is that
> right? If so, then I think there is no objection in trying to use it on
> Android if it works.
>
>
> > Yes SimpleXML would be only on Android branch. xmlpullparser provided
> with
> > Android does not support annotations and will have to write much longer
> codes.
>
> Understood. Then the initial proposal (fasterxml with JAXB annotations
> under CDDL license) would be nice if it works. Otherwise SimpleXML seems
> fine to me.
>
>     Martin
>
>
>