Generate classes with jaxb2-maven-plugin from WSDL

后端 未结 5 1958
不思量自难忘°
不思量自难忘° 2020-12-03 07:23

I am having trouble configuring the jaxb2-maven-plugin to generate Java classes from a WSDL and multiple XSD files that all exist in the same standard directory

5条回答
  •  余生分开走
    2020-12-03 07:57

    If you are generating wsdl and xsd as well try to put in a different execution configuration: It may not have the same schemaDirectory or the plugin will not run successfully the second execution, cause it caches executions based on this variable. I advice to do it such as

            
                org.codehaus.mojo
                jaxb2-maven-plugin
                1.6
                
                    
                        generate-sri-facturas
                        generate-sources
                        
                            xjc 
                         
                         
                            target/generated-sources/sri
                            ${commonsource.packageName} 
                            src/main/resources/schema/xsd
                            factura_v1.1.0.xsd
                         
                     
                    
                        generate-sri-autorizacion-comprobantes
                        generate-sources
                        
                            xjc 
                         
                         
                            target/generated-sources/sri/autorizacion
                            ${commonsource.packageName}.autorizacion
                            true
                            false
                            src/main/resources/schema/wsdl
                            AutorizacionComprobantes.wsdl
                         
                     
                 
             
    

    I created a xsd and a wsdl folder to separate configurations.

提交回复
热议问题