Unable to create java classes using codehaus.mojo jaxb2-maven-plugin
17:01 18 Aug 2017

I have a spring based web application in which I am trying to consume a SOAP service. I am using jaxb2-maven-plugin(org.codehaus.mojo) for that. However I see an empty jaxb2 folder which is crated under target and I dont see any java classes in it. I have the wsdl placed correctly under the resources folder itself.

Below is the plugin config created in pom.xml

    
        ${project.artifactId}
        
            
                src/main/resources
            
            
                src/main/java/com/xyz/rap/service/impl/wsdl
                wsdl
            
            
                src/main/config
                config
            
        
        
        
                org.codehaus.mojo
                jaxb2-maven-plugin
                1.6
                
                    
                        xjc
                        
                            xjc
                        
                    
                
                
                    
                    com.xxx.gen.retail.abc
                    
                    true
                    
                    false
                    
                    ${project.basedir}/src/main/resources
                    
                    gene.wsdl
                    
                    false
                
            
            
                org.apache.maven.plugins
                maven-compiler-plugin
                
                    
                    1.7
                    1.7
                
            
        
    

Below is the log when I run "maven install"

  [INFO] Building rap-web Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
**[INFO] --- jaxb2-maven-plugin:1.6:xjc (xjc) @ rap-web ---
[INFO] Generating source...
[WARNING] No encoding specified; default platform encoding will be used for generated sources.
[INFO] parsing a schema...
[INFO] compiling a schema...
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rap-web ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 15 resources
[INFO] Copying 3 resources to wsdl
[INFO] Copying 1 resource to config
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ rap-web ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 50 source files to C:\Users\xx67047\DSA-GIT-Projects\10.22.17-dsa-rap-services\rap-web\target\classes**
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rap-web ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\xx67047\DSA-GIT-Projects\10.22.17-dsa-rap-services\rap-web\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ rap-web ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rap-web ---

It says Parsing and compiling the schema in logs but I dont see any java classes getting created in the logs and I see an empty jaxb2 folder and an other empty generated-sources folder getting created. Please refer below image for that:

enter image description here

java maven soap wsdl jaxb2-maven-plugin