Generating hashCode() and equals() when creating Java classes using Mojo Jaxb2 maven plugin

前端 未结 7 1738
逝去的感伤
逝去的感伤 2020-12-03 15:18

The code I\'m working on is using jaxb2-maven-plugin from org.codehaus.mojo to generate Java classes from XSD schema. I\'m looking for a way to aut

7条回答
  •  佛祖请我去吃肉
    2020-12-03 15:39

    JAXB2 Basics you're mentioning is not a property of maven-jaxb2-plugin, it is a standalone set of JAXB 2.x plugins you can use with XJC - or jaxb2-maven-plugin or whatever.

            
                org.codehaus.mojo
                jaxb2-maven-plugin
                1.3.1
                
                    
                        xjc
                        
                            xjc
                        
                    
               
               
                    
                         -Xequals
                         -XhashCode
                    
               
               
                    
                        org.jvnet.jaxb2_commons
                        jaxb2-basics
                        0.11.1
                    
               
           
    

    What I wanted to ask - why not just use maven-jaxb2-plugin? It has so much more functionality compared to the Codehaus plugin - including configuration support for JAXB2 plugins.

提交回复
热议问题