• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to generate jaxb files from remote repository of schema using maven jaxb plugin

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am facing one issue where my requirement is that I need to generate jaxb files from schema using maven jaxb plugin. When I have the schema on my local repository (Like <schemaDirectory>src/main/resources/xxx</schemaDirectory>) then below code works fine but my schema is on remote location (Like <schemaDirectory>https://dev01.svn.com:8443/svn/YYY</schemaDirectory>;) and when I tried same code with SchemaDirectory value is remote path, it doesn't work. Any Idea. Please advice.

<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.5-01</version>
<executions>
<execution>
<id>appId</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<args>
<param>-npa</param>
</args>
<schemaDirectory>src/main/resources/xxx</schemaDirectory>
<schemaIncludes>
<include>**/*.xsd</include>
</schemaIncludes>
<generateDirectory>src/main/java</generateDirectory>
<generatePackage>com.app.jaxb</generatePackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot specify a http call against a schema directory xml element. One possibility is to have the schema located on a remote file system and specify the part of that remote file system in you maven pom.xml. Hope this helps!
 
Gourav Gupta
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Herry, I tried the below code as well but also it did not work. Can you please give me the example of your words?
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.5-01</version>
<executions>
<execution>
<id>appId</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<args>
<param>-npa</param>
</args>
<uriSchemas>
<uriSchema>https://dev01.svn.com:8443/svn/YYY/dummy.xsd</uriSchema>;
</uriSchemas>
<generateDirectory>src/main/java</generateDirectory>
<generatePackage>com.app.jaxb</generatePackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the section you should start with.
http://confluence.highsource.org/display/MJIIP/User+Guide#UserGuide-Resourceentries
 
Gourav Gupta
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much tsuji. It worked and helped me to resolve the issue. I tried below code and it worked fine.

<execution>
<id>appId</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<url>http://abc.com/user/dummy.xsd</url>;
</schema>
</schemas>
<generateDirectory>src/main/java</generateDirectory>
<generatePackage>com.test.jaxb</generatePackage>
</configuration>
</execution>
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic