Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Maven Project Issue

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

How to resolve it..?

Thanks
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Marco
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we could help yu better if you posted your pom.xml file, and the full output from running mvn. Don't forget to use the "Code" tags to properly format the POM and outout.
 
Karan Kapoor Singhal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply guys,

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.

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Karan Kapoor Singhal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Peter !!
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic