[ 
https://issues.apache.org/jira/browse/JOHNZON-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640762#comment-16640762
 ] 

Romain Manni-Bucau commented on JOHNZON-192:
--------------------------------------------

[~simone.tripodi] here are my inputs on these points:

1.  codestyle can matter cause you can use the plugin outside of a project to 
add files in a build/tool pipeline, at some point we can want to customize it 
(the one i personally would need is to use lombok for instance but for now it 
is not yet a strong requirement)
2. impact: slower startup since you must download more dependency, impact in 
terms of security vulnerabilities when scanning the build and so on, all 
vicious but real impacts in enterprise life. But I agree the most negative 
impact is to drop our owning on the generation logic while still relying on 
strings.
3. Not really. Java sources are easier cause there is not this number handling 
(NaN etc), no stream optimizations to do for runtime etc... so the knowledge is 
very low compared to json which is trivial to impl and quite hard to do right. 
Also note that jsonp is mainly about the low level API which enables JSONB etc 
which is harder so by itself its complexity can be not much but it is part of a 
stack and this is how it makes sense.
4. Nested* generation was the model I wanted to match the model but I agree it 
should be disable-able. I'm happy to have a new flag to disable it and use your 
model instead.

> Switch johnzon-maven-plugin class generation from manual source writer to a 
> more robust solution
> ------------------------------------------------------------------------------------------------
>
>                 Key: JOHNZON-192
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-192
>             Project: Johnzon
>          Issue Type: Improvement
>    Affects Versions: 1.1.10
>            Reporter: Simone Tripodi
>            Priority: Minor
>             Fix For: 1.1.11
>
>
> Currently, generated sources are obtained by writing strings to a writer; it 
> works for current needs but is not really comfort to maintain.
> I am going to submit a PullRequest to improve that current situation by 
> delegating the Java source code generation to 
> https://github.com/square/javapoet, a more robust and strongly-typed solution 
> provided by Square.
> Testing is also something that can be improved, in the Pull request I am 
> proposing a (simple) syntax-tree comparison, rather than mere string 
> comparison.
> Generated source code is still the same, even if with a slightly different 
> format, but Mojo source is easier to maintain.
> I hope you'll like the PR :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to