FlexDoc/XML - Ant IntegrationYou can easily integrate FlexDoc/XML with the Apache Ant automated build system.
Although we do not provide currently a specific Ant plugin, actually, it is not necessary. You may equally call the FlexDoc/XML Generator from Ant simply as a Java application.
Here is an example of how it can be done.
Let's suppose, you want to generate a framed HTML documentation using
XSDDoc | Templates | FramedDoc.tpl
template by the XML schema located at the URL
Here is a simple Windows command file that launches such a generation:
-Xmx1024m --module-path %MP% --module flexdoc.xml/xyz.flexdoc.xml.Generator -template %FDH%\templates\XSDDoc\FramedDoc.tpl -format HTML -d %FDH%\out -nodialog -launchviewer=false http://www.w3.org/2001/XMLSchema.xsd
build.xmlfile doing the same:
Execute the FlexDoc/XML generator.
IMPORTANT: The 'maxmemory' attribute sets the maximum heap size
available to Java VM when running FlexDoc/XML.
Check this attribute when you need to process large quantities of data!
The 'fork' attribute forces Ant to launch a separate instance of JVM.
This is needed to ensure that the memory specified in the 'maxmemory'
attribute will be allocated indeed. (However, you may remain using Ant's
JVM instance, if you have already specified for it that much of memory.)
All options you want to pass to the FlexDoc/XML Generator should be specified
here with the <arg> elements in the same order as on the command line.
Specify one or many data source XML files to be processed
by the specified template. (Both local pathnames and URLs
In this example, it is the XML schema to be documented.
To run that
build.xml file, you can use a Windows BAT command file specified like the following:
set ANT_HOME=C:\apache-ant set PATH=%ANT_HOME%\bin;%PATH% set JAVA_HOME=C:\Program Files\Java\jdk-14 call %ANT_HOME%\bin\ant.bat xsddoc