Maven Plugin for DocFlex/XML, Version 1.0



Content Files

index.html this file
plugin/ The DocFlex/XML Maven plugin implementation and installation files:
plugin/src/.../DocFlexXMLMojo.java
  • The Java class implementing the plugin (the mojo)
plugin/pom.xml
  • POM file to build the plugin
plugin/install.bat
  • Windows command file to build and install the plugin. (First, it installs all DocFlex/XML Java libraries in the Maven repository and, then, builds and installs the plugin.)
plugin/install.sh
  • Linux shell script to build and install the plugin.
plugin/test.bat
  • Windows command file to test the DocFlex/XML Maven plugin. (It simply runs the DocFlex/XML generator from under Maven with the generator GUI enabled.)
plugin/test.sh
  • The same file prepared for Linux
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
  • The project POM file
site1/site.bat
  • Windows command file to run the site generation
site1/site.sh
  • Linux shell script to run the site generation
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 'integrations/maven/' subdirectory of each edition of DocFlex/XML.

License

All Maven plugin-specific files contained in the 'integrations/maven/' subdirectory, which include: are free for any usage without limitation.

Installation

First, of course, you need to have Maven installed on your system.

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):

  1. Edit maven\plugin\pom.xml to specify the absolute pathname of docflex-xml.jar according to your DocFlex/XML installation in the following lines:
    <!-- DocFlex/XML Java library -->
    <dependency>
      <groupId>docflex</groupId>
      <artifactId>docflex-xml</artifactId>
      <version>1.9.0</version>
      <scope>system</scope>
      <systemPath>C:\docflex-xml-1.9.0\lib\docflex-xml.jar</systemPath>
    </dependency>
    
  2. Edit plugin\install.bat to specify 'JAVA_HOME' and 'M2_HOME' variables according to the locations of Java and Maven installed on your system. For example:
    set JAVA_HOME=C:\Program Files\Java\jdk1.7
    set M2_HOME=C:\apache-maven-2.2.1

    Switch the current directory to {docflex-xml}\integrations\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.

  3. To test the plugin, edit 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.

Running Demos

Site 1

This demo shows how to use DocFlex/XML Maven plugin to generate an XML Schema documentation for the reports section of a Maven-generated site.

The XML schema to be documented is the "XML Schema for W3C XML Schemas". Its files will be loaded directly from {docflex-xml}\lib\resources directory of your DocFlex/XML installation. (So, you don't need Internet to run this demo.)

In fact, 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:

  1. Switch to {docflex-xml}\integrations\maven\site1 directory.
  2. Run 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.
  3. Open 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.

Site 2

This demo shows how to configure DocFlex/XML Maven plugin to document two different XML schemas into separate Maven-site reports.

The schemas to be documented are the following:

  1. The "XML Schema for XML Schemas", as in the first example. Now, its files will be loaded directly from Internet by the URL:

  2. The "XML Schema for WSDL 1.1". Its initial source files will be loaded by the URLs:
Running the demo:
  1. Switch to {docflex-xml}\integrations\maven\site2 directory.
  2. Run site.bat (or site.sh under Linux).
  3. Open 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.

Site 3

If you think that DocFlex/XML (and the Maven plugin for it) is all about generating the XML schema documentation, this demo will show you a different usage. It generates two Maven-site reports:
  1. One is the XML schema documentation again. It will be generated for {docflex-xml}\samples\sales\sales.xsd, the XML schema that describes the data source for the second report.

  2. The second is the "Sales Report" report generated with {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!
Running the demo:
  1. Switch to {docflex-xml}\integrations\maven\site3 directory.
  2. Run site.bat (or site.sh under Linux). After Maven finishes you will see a new 'target' subdirectory.
  3. Open target\site\index.html file. Then, go to "Project Reports" and click "Sales XSDDoc" or "Sales Report".

Getting Help

For most up-to-date information about DocFlex/XML Maven Plugin, please see: www.filigris.com | DocFlex/XML | Integrations | Maven.

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


Copyright© 2008-2011 Filigris Works, Leonid Rudy Softwareprodukte.
To contact us, please visit www.filigris.com or e-mail to: contact@filigris.com