Getting Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (default-cli)
07:21 02 Dec 2019

I have an XSD file and I'm trying to generate jaxb classes for that using jaxb2-maven plugin, the problem I generate the classes running the command mvn jaxb2:xjc in command line. If I run the same command as goal in run configuration in eclipse I get

Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (default-cli)

If I only run mvn clean package install the classes are not getting generated. What am I doing wrong?

Here is my part of pom.xml:


    org.codehaus.mojo
    jaxb2-maven-plugin
    1.6
    
        
            
                xjc
            
        
    
    
    ${project.basedir}/src/main/resources
    Trans.xsd
    

java maven xjc jaxb2-maven-plugin