Multiple WSDLs Configurations With Maven JAXWS

后端 未结 2 740
别那么骄傲
别那么骄傲 2021-02-20 13:22

I need to include more than one WSDL in my Maven JAXWS configuration and I need to specify different output directories for them since some of the method names in wsdlA conflict

2条回答
  •  长情又很酷
    2021-02-20 13:34

    have an execution element for each wsdl and put the configuration within it. You can keep common configuration elements outside the execution element. e.g.:

    
    
      
         
          org.jvnet.jax-ws-commons 
          jaxws-maven-plugin 
          2.1 
          
            
              wsdla
               
                wsimport 
              
               
                 
                   ${basedir}/src/jaxws/wsdl/wsdla.wsdl
                 
                 target/gen/wsdla
               
             
            
              wsdlb
               
                wsimport 
              
               
                 
                   ${basedir}/src/jaxws/wsdl/wsdlb.wsdl
                 
                 target/gen/wsdlb
               
             
          
           
            
            com.mycee.project.model 
            
            
              ${basedir}/src/jaxws/binding
            
            
            true
           
                 
        
    
    
    

    Also, don't put generated code in /main/src/java as it won't get cleaned.

提交回复
热议问题