Usage

X4O had multiple modules the one which is most used is x4o-core which implements the full x4o framework.

X4O maven modules

  • x4o = project base.
  • x4o-core = Main x4o library.
  • x4o-elddoc = X4O Eld documentation support.
  • x4o-meta = X4O Meta sibling language.
  • x4o-plugin = X4O external plugins.
  • x4o-plugin-ant-elddoc = Ant x4o elddoc task.
  • x4o-plugin-ant-schema = Ant x4o schema task.

Setup as library

Append the core maven dependency;

   <dependency>
     <groupId>org.x4o</groupId>
     <artifactId>x4o-core</artifactId>
     <version>0.8.5-SNAPSHOT</version>
   </dependency>

Note: currently x4o is not in main maven repro, so build and install local yourself.

Setup build task

Append one or both of the x4o eld ant tasks;

  <dependency>
    <groupId>org.x4o.plugin</groupId>
    <artifactId>x4o-plugin-ant-elddoc</artifactId>
    <version>${project.version}</version>
  </dependency>
  <dependency>
    <groupId>org.x4o.plugin</groupId>
    <artifactId>x4o-plugin-ant-schema</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="eldDocWriter" classname="org.x4o.plugin.ant.eld.doc.EldDocWriterTask"/>
<taskdef name="eldXsdWriter" classname="org.x4o.plugin.ant.eld.xsd.EldXsdWriterTask"/>

<target name="build-cel-schema" depends="init">
        <mkdir dir="${test.dir}/cel-schema"/>
        <eldXsdWriter
                destdir="${test.dir}/cel-schema"
                supportclass="org.x4o.xml.eld.EldParserSupportCore"
                />
</target>
<target name="build-cel-elddoc" depends="init">
        <mkdir dir="${test.dir}/cel-elddoc"/>
        <eldDocWriter
                destdir="${test.dir}/cel-elddoc"
                supportclass="org.x4o.xml.eld.EldParserSupportCore"
                />
</target>