Major updates to XBean

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Major updates to XBean

luke
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

Guillaume Nodet-5

Over the last years, I have hardly seen anyone using the xbean-spring stuff anymore.  I think most of custom namespaces have been implemented using JAXB instead.  
I think one of the problem is that the xml tends to be ugly, so starting from the xml and using JAXB usually makes more sense.
I guess if you plan to use it in ActiveMQ, the generated schema has to be compatible with the previous ones, right ? Is that the case with your changes ?

Guillaume 

Le jeu. 2 août 2018 à 16:17, <[hidden email]> a écrit :
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl



--
------------------------
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

Romain Manni-Bucau
Hi Lukasz,

As mentionned on IRC i'd just make the current blueprint module working (and avoid to create a blueprint-cm) module and I think it is ok to stay on xbean 4 in terms of versioning since this is for a single consumer (compared to other parts of the project). Now more technically ensure to not use the built maven plugin in the same reactor cause it doesn't work reliably with maven (this is why it was using ant).

Anyway, kudo to make this part living! Very impatient to upgrade.

Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book


Le jeu. 2 août 2018 à 16:26, Guillaume Nodet <[hidden email]> a écrit :

Over the last years, I have hardly seen anyone using the xbean-spring stuff anymore.  I think most of custom namespaces have been implemented using JAXB instead.  
I think one of the problem is that the xml tends to be ugly, so starting from the xml and using JAXB usually makes more sense.
I guess if you plan to use it in ActiveMQ, the generated schema has to be compatible with the previous ones, right ? Is that the case with your changes ?

Guillaume 

Le jeu. 2 août 2018 à 16:17, <[hidden email]> a écrit :
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl



--
------------------------
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

luke
Sadly not only updates to blueprint are necessary. Currently ActoveMQ shades and does not re-export xbean-spring packages. Embedding is done in order to get ActiveMQ working with Spring 4.
This prevents others from adding additional namespace handlers with custom elements.

To solve this in proper way, we need to bump spring version in xbean and move it a bit ahead.

Blueprint support on other hand refer internal classes from aries which are no longer exported. Some of features which were implemented in xbean are available in aries directly (ie nested placeholders). I didn’t track aries lately, but maybe there is a way to inject own placeholder processor or something.
The xbean blueprint cm namespace integrates jexl for expression processing, however I haven't seen anyone using it yet.

Cheers,
Łukasz Dywicki

On 2 Aug 2018, at 16:49, Romain Manni-Bucau <[hidden email]> wrote:

Hi Lukasz,

As mentionned on IRC i'd just make the current blueprint module working (and avoid to create a blueprint-cm) module and I think it is ok to stay on xbean 4 in terms of versioning since this is for a single consumer (compared to other parts of the project). Now more technically ensure to not use the built maven plugin in the same reactor cause it doesn't work reliably with maven (this is why it was using ant).

Anyway, kudo to make this part living! Very impatient to upgrade.

Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book


Le jeu. 2 août 2018 à 16:26, Guillaume Nodet <[hidden email]> a écrit :

Over the last years, I have hardly seen anyone using the xbean-spring stuff anymore.  I think most of custom namespaces have been implemented using JAXB instead.  
I think one of the problem is that the xml tends to be ugly, so starting from the xml and using JAXB usually makes more sense.
I guess if you plan to use it in ActiveMQ, the generated schema has to be compatible with the previous ones, right ? Is that the case with your changes ?

Guillaume 

Le jeu. 2 août 2018 à 16:17, <[hidden email]> a écrit :
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl



--
------------------------
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

luke
In reply to this post by Guillaume Nodet-5
I don't see any new developments started with xbean, but there are still projects under active development which rely on it. ActiveMQ 5.x might be last one, not sure about others, and it does suffer because no investments in xbean. JAXB is fine, but I doubt if any custom type mapping will be ever able to provide such extensibility as Spring with its declarative configuration. Moving ActiveMQ 5 configuration schema to JAXB would be definitely a difficult task.

Schema generated with my branch does not differ from old one. There are some constructions from xbean which fail xml schema validation after upgrading to Spring 4 with its XSD checks. I had no issues updating XML namespace declarations (xsi etc) but some parts of schema simply break.
This includes map elements (MapMapping) which are reported as invalid content. I made an attempt to fix that and extend generator to create proper declarations of elements.

My changes so far update xbean maven plugin, remove duplicate code and separate generators from namespace handlers. This allows to remove ant dependency from namespace handler runtime imports, let maven plugin use some simple plexus IoC for generator discovery.
These are mainly code reorganizations to made xbean and downstream projects maintenance easier.

Łukasz Dywicki

On 2 Aug 2018, at 16:25, Guillaume Nodet <[hidden email]> wrote:


Over the last years, I have hardly seen anyone using the xbean-spring stuff anymore.  I think most of custom namespaces have been implemented using JAXB instead.  
I think one of the problem is that the xml tends to be ugly, so starting from the xml and using JAXB usually makes more sense.
I guess if you plan to use it in ActiveMQ, the generated schema has to be compatible with the previous ones, right ? Is that the case with your changes ?

Guillaume 

Le jeu. 2 août 2018 à 16:17, <[hidden email]> a écrit :
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl



--
------------------------
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

Romain Manni-Bucau


Le jeu. 2 août 2018 22:35, Łukasz Dywicki <[hidden email]> a écrit :
I don't see any new developments started with xbean, but there are still projects under active development which rely on it. ActiveMQ 5.x might be last one, not sure about others, and it does suffer because no investments in xbean. JAXB is fine, but I doubt if any custom type mapping will be ever able to provide such extensibility as Spring with its declarative configuration. Moving ActiveMQ 5 configuration schema to JAXB would be definitely a difficult task.

Asm, reflect and finder are way pore active, right. Another option would be to reverse this code to amq but im fine keeping it here and upgrading deps. I would just prefer to control the number of these modules.


Schema generated with my branch does not differ from old one. There are some constructions from xbean which fail xml schema validation after upgrading to Spring 4 with its XSD checks. I had no issues updating XML namespace declarations (xsi etc) but some parts of schema simply break.
This includes map elements (MapMapping) which are reported as invalid content. I made an attempt to fix that and extend generator to create proper declarations of elements.

My changes so far update xbean maven plugin, remove duplicate code and separate generators from namespace handlers. This allows to remove ant dependency from namespace handler runtime imports, let maven plugin use some simple plexus IoC for generator discovery.
These are mainly code reorganizations to made xbean and downstream projects maintenance easier.

Did you try dropping it from your local .m2? It is not supposed to work - even known to fail at least until 3.5.3.


Łukasz Dywicki

On 2 Aug 2018, at 16:25, Guillaume Nodet <[hidden email]> wrote:


Over the last years, I have hardly seen anyone using the xbean-spring stuff anymore.  I think most of custom namespaces have been implemented using JAXB instead.  
I think one of the problem is that the xml tends to be ugly, so starting from the xml and using JAXB usually makes more sense.
I guess if you plan to use it in ActiveMQ, the generated schema has to be compatible with the previous ones, right ? Is that the case with your changes ?

Guillaume 

Le jeu. 2 août 2018 à 16:17, <[hidden email]> a écrit :
Ladies and gentlemen,
I started messing around XBean as its codebase is in moderate form. I’ve run into multiple issues while trying to get it running under Karaf 4.1 together with ActiveMQ and decided to push it forward. I spent last couple of days cleaning up duplicated code and refactoring maven plugin so it does not depend on any specific generator. There is still lots of things to do as there are several Spring tests which are failing. Due to stronger schema validation around 15 spring tests currently fails. This is because generated schema works only for basic elements and fails with embedded collections. I already started to reform that part and I should be able to update XsdGenerator.

I would like to submit PR once I solve all the issues and test it with ActiveMQ would you accept my work? Due to amount of breaking changes I started 5.0.x branch (which might be good to start support Spring 4 or 5).
There is one big commit so far in my GitHub fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x, which I can chunk into smaller (yet non compilable) commits in order to make history a bit clearer. 

Kind regards,
Łukasz

Apache Karaf Commiter & PMC member
[hidden email]
Twitter: ldywicki
Blog: http://dywicki.pl



--
------------------------
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

luke
I've fixed RAT warnings and compilation issues. I also updated XSD
generation logic, so it uses Apache WS Xmlschema instead of println
statements.
Generated schema is compatible with previous one.

I also cleaned up type handling a bit.

There are still 18 xbean-spring tests which are failing. These failures
happen due to schema validation for more exotic constructions (maps,
mixed content etc).
I tested my branch locally against ActiveMQ 5.x and it does work. Since
AMQ does not use any of fancy mappings, just standard attributes and
elements - it worked just fine.
Project compiles and builds under Maven 3.5.4 with empty repo too.

Cheers,
Lukasz



On 02.08.2018 22:46, Romain Manni-Bucau wrote:

>
>
> Le jeu. 2 août 2018 22:35, Łukasz Dywicki <[hidden email]
> <mailto:[hidden email]>> a écrit :
>
>     I don't see any new developments started with xbean, but there are
>     still projects under active development which rely on it. ActiveMQ
>     5.x might be last one, not sure about others, and it does suffer
>     because no investments in xbean. JAXB is fine, but I doubt if any
>     custom type mapping will be ever able to provide such extensibility
>     as Spring with its declarative configuration. Moving ActiveMQ 5
>     configuration schema to JAXB would be definitely a difficult task.
>
>
> Asm, reflect and finder are way pore active, right. Another option would
> be to reverse this code to amq but im fine keeping it here and upgrading
> deps. I would just prefer to control the number of these modules.
>
>
>     Schema generated with my branch does not differ from old one. There
>     are some constructions from xbean which fail xml schema validation
>     after upgrading to Spring 4 with its XSD checks. I had no issues
>     updating XML namespace declarations (xsi etc) but some parts of
>     schema simply break.
>     This includes map elements (MapMapping) which are reported as
>     invalid content. I made an attempt to fix that and extend generator
>     to create proper declarations of elements.
>
>     My changes so far update xbean maven plugin, remove duplicate code
>     and separate generators from namespace handlers. This allows to
>     remove ant dependency from namespace handler runtime imports, let
>     maven plugin use some simple plexus IoC for generator discovery.
>     These are mainly code reorganizations to made xbean and downstream
>     projects maintenance easier.
>
>
> Did you try dropping it from your local .m2? It is not supposed to work
> - even known to fail at least until 3.5.3.
>
>
>     Łukasz Dywicki
>
>     On 2 Aug 2018, at 16:25, Guillaume Nodet <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>>
>>     Over the last years, I have hardly seen anyone using the
>>     xbean-spring stuff anymore.  I think most of custom namespaces
>>     have been implemented using JAXB instead.  
>>     I think one of the problem is that the xml tends to be ugly, so
>>     starting from the xml and using JAXB usually makes more sense.
>>     I guess if you plan to use it in ActiveMQ, the generated schema
>>     has to be compatible with the previous ones, right ? Is that the
>>     case with your changes ?
>>
>>     Guillaume 
>>
>>     Le jeu. 2 août 2018 à 16:17, <[hidden email]
>>     <mailto:[hidden email]>> a écrit :
>>
>>         Ladies and gentlemen,
>>         I started messing around XBean as its codebase is in moderate
>>         form. I’ve run into multiple issues while trying to get it
>>         running under Karaf 4.1 together with ActiveMQ and decided to
>>         push it forward. I spent last couple of days cleaning up
>>         duplicated code and refactoring maven plugin so it does not
>>         depend on any specific generator. There is still lots of
>>         things to do as there are several Spring tests which are
>>         failing. Due to stronger schema validation around 15 spring
>>         tests currently fails. This is because generated schema works
>>         only for basic elements and fails with embedded collections. I
>>         already started to reform that part and I should be able to
>>         update XsdGenerator.
>>
>>         I would like to submit PR once I solve all the issues and test
>>         it with ActiveMQ would you accept my work? Due to amount of
>>         breaking changes I started 5.0.x branch (which might be good
>>         to start support Spring 4 or 5).
>>         There is one big commit so far in my GitHub
>>         fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x,
>>         which I can chunk into smaller (yet non compilable) commits in
>>         order to make history a bit clearer. 
>>
>>         Kind regards,
>>         Łukasz
>>         —
>>         Apache Karaf Commiter & PMC member
>>         [hidden email] <mailto:[hidden email]>
>>         Twitter: ldywicki
>>         Blog: http://dywicki.pl
>>         Code-House - http://code-house.org
>>
>>
>>
>>     --
>>     ------------------------
>>     Guillaume Nodet
>>
Reply | Threaded
Open this post in threaded view
|

Re: Major updates to XBean

Romain Manni-Bucau
Hmm, users can use fancy stuff right? Or is it deprecated even for amq?

Le sam. 4 août 2018 00:06, Łukasz Dywicki <[hidden email]> a écrit :
I've fixed RAT warnings and compilation issues. I also updated XSD
generation logic, so it uses Apache WS Xmlschema instead of println
statements.
Generated schema is compatible with previous one.

I also cleaned up type handling a bit.

There are still 18 xbean-spring tests which are failing. These failures
happen due to schema validation for more exotic constructions (maps,
mixed content etc).
I tested my branch locally against ActiveMQ 5.x and it does work. Since
AMQ does not use any of fancy mappings, just standard attributes and
elements - it worked just fine.
Project compiles and builds under Maven 3.5.4 with empty repo too.

Cheers,
Lukasz



On 02.08.2018 22:46, Romain Manni-Bucau wrote:
>
>
> Le jeu. 2 août 2018 22:35, Łukasz Dywicki <[hidden email]
> <mailto:[hidden email]>> a écrit :
>
>     I don't see any new developments started with xbean, but there are
>     still projects under active development which rely on it. ActiveMQ
>     5.x might be last one, not sure about others, and it does suffer
>     because no investments in xbean. JAXB is fine, but I doubt if any
>     custom type mapping will be ever able to provide such extensibility
>     as Spring with its declarative configuration. Moving ActiveMQ 5
>     configuration schema to JAXB would be definitely a difficult task.
>
>
> Asm, reflect and finder are way pore active, right. Another option would
> be to reverse this code to amq but im fine keeping it here and upgrading
> deps. I would just prefer to control the number of these modules.
>
>
>     Schema generated with my branch does not differ from old one. There
>     are some constructions from xbean which fail xml schema validation
>     after upgrading to Spring 4 with its XSD checks. I had no issues
>     updating XML namespace declarations (xsi etc) but some parts of
>     schema simply break.
>     This includes map elements (MapMapping) which are reported as
>     invalid content. I made an attempt to fix that and extend generator
>     to create proper declarations of elements.
>
>     My changes so far update xbean maven plugin, remove duplicate code
>     and separate generators from namespace handlers. This allows to
>     remove ant dependency from namespace handler runtime imports, let
>     maven plugin use some simple plexus IoC for generator discovery.
>     These are mainly code reorganizations to made xbean and downstream
>     projects maintenance easier.
>
>
> Did you try dropping it from your local .m2? It is not supposed to work
> - even known to fail at least until 3.5.3.
>
>
>     Łukasz Dywicki
>
>     On 2 Aug 2018, at 16:25, Guillaume Nodet <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>>
>>     Over the last years, I have hardly seen anyone using the
>>     xbean-spring stuff anymore.  I think most of custom namespaces
>>     have been implemented using JAXB instead.  
>>     I think one of the problem is that the xml tends to be ugly, so
>>     starting from the xml and using JAXB usually makes more sense.
>>     I guess if you plan to use it in ActiveMQ, the generated schema
>>     has to be compatible with the previous ones, right ? Is that the
>>     case with your changes ?
>>
>>     Guillaume 
>>
>>     Le jeu. 2 août 2018 à 16:17, <[hidden email]
>>     <mailto:[hidden email]>> a écrit :
>>
>>         Ladies and gentlemen,
>>         I started messing around XBean as its codebase is in moderate
>>         form. I’ve run into multiple issues while trying to get it
>>         running under Karaf 4.1 together with ActiveMQ and decided to
>>         push it forward. I spent last couple of days cleaning up
>>         duplicated code and refactoring maven plugin so it does not
>>         depend on any specific generator. There is still lots of
>>         things to do as there are several Spring tests which are
>>         failing. Due to stronger schema validation around 15 spring
>>         tests currently fails. This is because generated schema works
>>         only for basic elements and fails with embedded collections. I
>>         already started to reform that part and I should be able to
>>         update XsdGenerator.
>>
>>         I would like to submit PR once I solve all the issues and test
>>         it with ActiveMQ would you accept my work? Due to amount of
>>         breaking changes I started 5.0.x branch (which might be good
>>         to start support Spring 4 or 5).
>>         There is one big commit so far in my GitHub
>>         fork: https://github.com/splatch/geronimo-xbean/tree/xbean-5.0.x,
>>         which I can chunk into smaller (yet non compilable) commits in
>>         order to make history a bit clearer. 
>>
>>         Kind regards,
>>         Łukasz
>>         —
>>         Apache Karaf Commiter & PMC member
>>         [hidden email] <mailto:[hidden email]>
>>         Twitter: ldywicki
>>         Blog: http://dywicki.pl
>>         Code-House - http://code-house.org
>>
>>
>>
>>     --
>>     ------------------------
>>     Guillaume Nodet
>>