I am building a maven project, my pom.xml has a executions to build JaxB classes from xsd files.The JaxB classes are generated properly but the issue here is - the build is failing saying COMPILATION ERROR in the classes which uses JaxB beans.
In otherwords, I have a maven project which has classes using JaxB Beans which are generated by the same pom.xml.
what kind of compilation error do you get? Could you please post the relevant parts of the Maven output?
Did you add any JAXB implementation to the dependencies section of your POM? Maybe you just get an error because your project doesn't know about the JAXB classes and annotations. But it's hard to tell without knowing more details about the compilation error.
I have compilation error in the Java classes which uses the JaxB Beans. The error says the JaxB Beans cannot be found.
Here's my pom.xml
I am using MyRequest.java generated at line 76 in other java classes. Is something wrong with my project settings. I also have a compilation error at line number 70, but the error is not stopping in generateing the Jaxb Class.
This seems to me like the version of the module containing the Plexus DirectoryScanner doesn't match the version of the jaxb2-maven-plugin. On my PC, I have over a dozen different vesions of plexus-utils-*.jar (which is where I found the DirectoryScanner class). You might tyry running mvn with the -X option to see which version of plexus-utils is being loaded. And you mighth vae to find out which version the jaxb2-maven-plugin is depending on. Most likely, some other plugin is depending on a different version of plexus-utils and Maven is pulling that one in. (I've had a similar issue happen to me recently with different versions of Maven pulling in different versions of components which were incompatible with the versions of the plugin I was using. I solved the issue by ensuring I was using hte latest Maven and the latest versions of thep lugins.)