How can I tell jaxb / Maven to generate multiple schema packages?

前端 未结 9 1851
旧时难觅i
旧时难觅i 2020-11-28 03:16

Example:

       
       
           org.jvnet.jaxb2.maven2         


        
9条回答
  •  醉话见心
    2020-11-28 03:43

    you should change that to define the plugin only once and do twice execution areas...like the following...and the generateDirectory should be set (based on the docs)..

    
      org.jvnet.jaxb2.maven2
      maven-jaxb2-plugin
      0.7.1
      
        
          firstrun
          
            generate
          
          
            target/gen1
            src/main/resources/dir1
            
              schema1.xsd
            
            schema1.package
          
        
        
          secondrun
          
            generate
          
          
            target/gen2
            src/main/resources/dir2
            
              schema2.xsd
            
            schema2.package
          
        
      
    
    

    It seemed to me that you are fighting against single artifact rule of maven...may be you should think about this.

提交回复
热议问题