Generate the JPA metamodel files using maven-processor-plugin - What is a convenient way for re-generation?

前端 未结 3 1704
无人及你
无人及你 2020-12-14 12:38

I am trying to use maven-processor-plugin for generating JPA metamodel java files and I set up my pom.xml as belows.


        

        
3条回答
  •  伪装坚强ぢ
    2020-12-14 13:16

    March 2018 Answer with Hibernate 5

    As described on https://docs.jboss.org/hibernate/orm/5.0/topical/html/metamodelgen/MetamodelGenerator.html:

    Simply add this to ... in your pom.xml:

    
    
        org.hibernate
        hibernate-jpamodelgen
        5.2.16.Final
        provided
    
    

    There is nothing else that should be necessary for you to do. If you run into issues, visit the jboss page at the top of this answer.

    The version included in this snippet is the latest version as of March, 2018, but check the artifact page (https://mvnrepository.com/artifact/org.hibernate/hibernate-jpamodelgen) for the latest version.

    This is not intended to be an original answer, but should prove helpful to anyone who wants a simple, straightforward copy-pastable solution.

提交回复
热议问题