index.html
|
this file |
plugin/
|
The DocFlex/XML Maven plugin implementation and installation files: |
plugin/src/.../DocFlexXMLMojo.java
|
|
plugin/target/.../DocFlexXMLMojo.class
|
|
plugin/pom.xml
|
|
plugin/install.bat
|
|
plugin/install.sh
|
|
plugin/test.bat
|
|
plugin/test.sh
|
|
site1/
|
A demo project that shows how to use the DocFlex/XML Maven plugin to generate an XML Schema documentation for the reports section of a Maven-generated site: |
site1/pom.xml
|
|
site1/site.bat
|
|
site1/site.sh
|
|
site2/
|
Another Maven demo project that shows how to configure the plugin to generate the documentation for two different XML schemas as separate Maven-site reports. |
site3/
|
This demo also generates two reports for the Maven-site:
one is the "Sales Report" by samples/sales/sales.xml
and another one is the XML Schema documentation by
samples/sales/sales.xsd.
|
Note: These files and directories can be found in 'maven/' subdirectory
of DocFlex/XML SDK.
'maven/' subdirectory,
which include:
DocFlexXMLMojo.java)
If you do not have Maven yet, download it from the Apache Maven web-site:
http://maven.apache.org/.
The download archive will contain exactly the Maven home directory, which you may
unpack at any location (e.g. C:\apache-maven-2.2.1).
Further, please follow these steps (Windows platform):
maven\plugin\pom.xml to specify the absolute pathname of
docflex-xml.jar according to your DocFlex/XML SDK installation in the following lines:
<dependency> <groupId>docflex</groupId> <artifactId>docflex-xml</artifactId> <version>1.8.0</version> <scope>system</scope> <systemPath>C:\docflex-xml-1.8.0\lib\docflex-xml.jar</systemPath> </dependency>
plugin\install.bat to specify 'JAVA_HOME' and
'M2_HOME' variables according to the locations of Java and Maven 2
installed on your system. For example:
set JAVA_HOME="C:\Program Files\Java\jdk1.6"
set M2_HOME=C:\apache-maven-2.2.1
Note: When a directory pathname contains spaces, it must be enclosed in double quotes!
Switch the current directory to {docflex-xml}\maven\plugin
and run install.bat.
If everything is correct, the DocFlex/XML Maven Plugin will be compiled and installed. (You may need to wait until Maven downloads from Internet and installs lots of other plugins it needs.)
On Linux, everything is the same except that, instead of install.bat,
you should use install.sh
(also edit its "Permission" property to allow it to be executed by Linux).
Note: To pass the installation successfully, you must be connected to Internet during it.
plugin\test.bat (on Windows) or
plugin/test.sh (on Linux) according to your Java and Maven locations and run it.
The generator dialog should appear.
The XML schema to be documented is the "XML Schema for W3C XML Schemas".
Its files will be loaded directly from
{docflex-xml}\templates\XSDDoc\xmltype directory of your DocFlex/XML installation.
(So, you don't need Internet to run this demo.)
Interestingly, this very schema is used by the "XSDDoc" templates -- the ones which implement the XML Schema documentation generator itself. So, here we have a kind of "bootstrapping". The original "XML Schema for XML Schemas" files can be found by URL: http://www.w3.org/2001/XMLSchema.xsd.
Running the demo is very simple:
{docflex-xml}\maven\site1 directory.
site.bat (or site.sh under Linux --
but do not forget to change its "Permission" properties to allow it to be executed).
After Maven ends you will see a new 'target' subdirectory.
target\site\index.html file.
Then, go to "Project Reports" and click "XSDDoc".
You will see a demo XML Schema documentation generated by DocFlex/XML XSDDoc.
The schemas to be documented are the following:
{docflex-xml}\maven\site2 directory.
site.bat (or site.sh under Linux).
target\site\index.html file.
Then, go to "Project Reports" and click "XMLSchema_xsddoc" or "wsdl11_xsddoc".
You will see two different XML Schema documentations generated with DocFlex/XML XSDDoc.
{docflex-xml}\samples\sales\sales.xsd, the XML schema that describes the data source for the
second report.
{docflex-xml}\samples\sales\sales.tpl template
(which uses the sales.xsd schema) from {docflex-xml}\samples\sales\sales.xml
(which is the source of the report's data).
The "Sales Report" itself has nothing to do with XML schemas!
{docflex-xml}\maven\site3 directory.
site.bat (or site.sh under Linux).
After Maven finishes you will see a new 'target' subdirectory.
target\site\index.html file.
Then, go to "Project Reports" and click "Sales XSDDoc" or "Sales Report".
If you have any questions, suggestions, etc. about Maven Plugin for DocFlex/XML, please let us know by sending an email to: support@docflex.com or contact@filigris.com