Difference between revisions of "SMILA/Development Guidelines/Setup for JAXB code generation"
(→Generate Sources from Command line) |
|||
(16 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
=== Introduction === | === Introduction === | ||
− | This page describes additional setup steps you need to do if you want to use JAXB to generate classes from XML schema descriptions for SMILA. | + | This page describes additional setup steps you need to do if you want to use JAXB to generate classes from XML schema descriptions for SMILA. |
− | + | ||
=== Steps to install needed libraries === | === Steps to install needed libraries === | ||
# Setup a build library as described in [[SMILA/Development Guidelines/Howto build a SMILA-Distribution]]. In this document we will use {{path|lib/}} as the root of it. | # Setup a build library as described in [[SMILA/Development Guidelines/Howto build a SMILA-Distribution]]. In this document we will use {{path|lib/}} as the root of it. | ||
− | # Download the JAXB reference implementation 2.1.6 or above from [ | + | # The required JAXB compiler libraries are contained in our [http://ubuntuone.com/312LdFKCXLYfapEpxLMR9v package of the SMILA build libraries]. If you want to collect them on your own, use these instructions: |
− | # unpack it with (see [https://jaxb.dev.java.net/2.1.6/ here]) <source lang="text">java -jar <JAXB-version>.jar </source> | + | ## Download the JAXB reference implementation 2.1.6 or above from [http://jaxb.java.net/ http://jaxb.java.net/] |
− | # copy the following into your <tt>lib/xjc</tt> | + | ## unpack it with (see [https://jaxb.dev.java.net/2.1.6/ here]) <source lang="text">java -jar <JAXB-version>.jar </source> |
− | #* all jars in the {{path|jaxb-ri-<version>/lib/}} | + | ## copy the following into your <tt>lib/xjc</tt> |
− | #* <tt>InterfacesXJCPlugin.jar</tt> | + | ##* all jars in the {{path|jaxb-ri-<version>/lib/}} |
+ | ##* <tt>InterfacesXJCPlugin.jar</tt>, you can download it [https://www.dropbox.com/s/fiegug07oygn9uk/InterfacesXJCPlugin.jar here] | ||
+ | |||
Your build lib directory should now look at least like this: | Your build lib directory should now look at least like this: | ||
<source lang="text"> | <source lang="text"> | ||
lib/ | lib/ | ||
ant-contrib/ | ant-contrib/ | ||
− | ant-contrib-1. | + | ant-contrib-1.0b3.jar |
xjc/ | xjc/ | ||
+ | jaxb-api.jar | ||
+ | jaxb-impl.jar | ||
jaxb-xjc.jar | jaxb-xjc.jar | ||
InterfacesXJCPlugin.jar | InterfacesXJCPlugin.jar | ||
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
Line 34: | Line 33: | ||
The JAXB classes should now be generated in the <tt>code/gen</tt> directory of your bundle. | The JAXB classes should now be generated in the <tt>code/gen</tt> directory of your bundle. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:SMILA]] | [[Category:SMILA]] |
Latest revision as of 04:23, 22 April 2014
Introduction
This page describes additional setup steps you need to do if you want to use JAXB to generate classes from XML schema descriptions for SMILA.
Steps to install needed libraries
- Setup a build library as described in SMILA/Development Guidelines/Howto build a SMILA-Distribution. In this document we will use lib/ as the root of it.
- The required JAXB compiler libraries are contained in our package of the SMILA build libraries. If you want to collect them on your own, use these instructions:
- Download the JAXB reference implementation 2.1.6 or above from http://jaxb.java.net/
- unpack it with (see here)
java -jar <JAXB-version>.jar
- copy the following into your lib/xjc
- all jars in the jaxb-ri-<version>/lib/
- InterfacesXJCPlugin.jar, you can download it here
Your build lib directory should now look at least like this:
lib/ ant-contrib/ ant-contrib-1.0b3.jar xjc/ jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar InterfacesXJCPlugin.jar
Generate Sources from Command line
- Put SMILA.builder into the same folder as the bundle for which you are generating the folder (for all SMILA bundles this is the case after a checkout).
- To generate the classes, you can now use:
ant -Dlib.dir=<SMILA-Build-Lib-Dir>
The JAXB classes should now be generated in the code/gen directory of your bundle.