• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

maven jaxb2 plugin configuration

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm not sure, if this question should be actually posted into this forum or JAXB forum. But please move this post to a relevant forum, if you feel so.

I have a project structure like below (please see the attachment)


schemas folder under src/main/resources is an archive file with several xsd.
Now I have my bindings file (.xjb) under src/main/resources/xjb and have some customizations for a schema say, com/domain/sample.xsd.




Before this step is executed, we are expanding the archived file to the location given by "${project.build.directory}/expanded-schemas-${version}"

When I ran this pom, bindings is complaining apparently because it could not find sample.xsd, because it is trying to look for that file with respect to the path "${project.basedir}/src/main/resources/xjb/" this is where the binding file is residing.

So, with out giving the absolute path in bindings file, is there any way to give an indicator such the bindings file need to look for the rquired xsd with respect to <schemaDirectory> instead of <bindingDirectory>

Please advise.




structure.GIF
[Thumbnail for structure.GIF]
Project Structure
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestion on this.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a little lost. Based on your description I don't know where sample.xsd is located. Could you please give the full path (relative to the project's base directory) for sample.xsd. If it is multiple places at the time the build fails, lists every location.

It would also help if you posted the full error message you got from Maven. I think I understand what the error is, but I'm not sure.
 
This one time, at bandcamp, I had relations with a tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic