wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven jaxb2 plugin configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven jaxb2 plugin configuration" Watch "maven jaxb2 plugin configuration" New topic
Author

maven jaxb2 plugin configuration

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

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.







[Thumbnail for structure.GIF]



Regards
KumarRaja

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Any suggestion on this.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven jaxb2 plugin configuration
 
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
Tomcat and Axis2
jars in the custom ear not getting referenced at compile time
Filtering problem using maven-read-properties plugin in pom.xml file
Could not resolve dependencies for maven project