x4o/src/site/apt/usage.apt
2013-04-29 01:43:48 +02:00

94 lines
2.9 KiB
Plaintext

~~
~~ Copyright (c) 2004-2013, Willem Cazander
~~ All rights reserved.
~~
~~ Redistribution and use in source and binary forms, with or without modification, are permitted provided
~~ that the following conditions are met:
~~
~~ * Redistributions of source code must retain the above copyright notice, this list of conditions and the
~~ following disclaimer.
~~ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
~~ the following disclaimer in the documentation and/or other materials provided with the distribution.
~~
~~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
~~ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
~~ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
~~ THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
~~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
~~ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
~~ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
~~ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
~~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
~~
Usage
X4O had multiple modules the one which is most used is x4o-driver which implements the full x4o framework.
* X4O maven modules
* x4o = project base.
* x4o-driver = Main x4o library.
* x4o-elddoc = X4O Eld documentation support.
* x4o-meta = X4O Meta sibling language.
* x4o-plugin = X4O external plugins.
* x4o-plugin-ant = X4O Ant plugins for schema and documentation task.
* x4o-plugin-maven = X4O Maven plugin task.
* Setup as library
Append the core maven dependency;
+--
<dependency>
<groupId>org.x4o</groupId>
<artifactId>x4o-driver</artifactId>
<version>0.8.6-SNAPSHOT</version>
</dependency>
+--
Note: currently x4o is not in main maven repro, so build and install local yourself.
* Setup build task
Append the x4o ant tasks;
+--
<dependency>
<groupId>org.x4o.plugin</groupId>
<artifactId>x4o-plugin-ant</artifactId>
<version>${project.version}</version>
</dependency>
+--
Use in ant and set the supportclass from the language you want to run the task for.
+--
<taskdef name="writeLanguageDoc" classname="org.x4o.plugin.ant.X4OWriteLanguageDocTask"/>
<taskdef name="writeLanguageSchema" classname="org.x4o.plugin.ant.X4OWriteLanguageSchemaTask"/>
<target name="build-cel-schema" depends="init">
<mkdir dir="${test.dir}/cel-schema"/>
<writeLanguageSchema
destdir="${test.dir}/cel-schema"
languageName="cel"
/>
</target>
<target name="build-cel-elddoc" depends="init">
<mkdir dir="${test.dir}/cel-elddoc"/>
<writeLanguageDoc
destdir="${test.dir}/cel-elddoc"
languageName="cel"
/>
</target>
+--