Java – is there a generic Maven code generator?

I am currently developing a project that uses strong code generation for various purposes A generator generates SQL scripts from JPA entities The other generates DTOs from POJOs, and the other generates JPA2 0 metamodel, the other generates some XML and schema files based on Java classes... Each generator is completely different and needs to be configured in different ways

My question now is... Does any generic Maven code generator plug-in have the following properties: – create a POJO model of a Java class (name, properties, comments, methods...) – use a template definition to generate any output using the POJO model. – Allow me to specify multiple templates for a class - allow me to generate code and resources - allow me to generate a base class for the target / source and a virtual implementation for Src / main / Java, It only extends the base class (if the virtual class in Src / main / Java exists, there is no response. If it does not ', it will generate such a virtual class. This code is checked into SCM and allows the generated class to be extended manually)

I use the flexmojos graniteds plug-in to generate my ActionScript model code, but it is well suited for specific purposes

I think such a universal generator will make things much easier

Solution

There is minuteproject, which supports various input / output formats It's not 100% what you want, but the idea is the same: create a single generator for various goals

I don't think it has Maven plug-in yet, but developers are very sensitive I believe you can create a function request for it

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>