However, our plugin both extends
org.apache.maven.plugin.AbstractMojo
class and implements
org.apache.maven.reporting.MavenReport
interface. So, it can be used both as a normal and reporting plugin simultaneously.
Note also, that although it is a simple Maven plugin, at the same time, it is a very powerful one because it does all FlexDoc/XML Generator can do. In particular:
![]() |
That is possible because DiagramKit, which generates those diagrams, is equally a part of FlexDoc/XML.
For further details, please see: |
'FlexDocXMLMojo.java'
class found at:
{flexdoc-xml}/integrations/maven/plugin/src/
'{flexdoc-xml}'
designates FlexDoc/XML installation directory.
To install the plugin into Maven repository, please follow these steps:
{flexdoc-xml}/integrations/maven/plugin/pom.xml
<properties>
<!-- The absolute pathname of FlexDoc/XML home directory -->
<flexdoc.xml.home>C:/flexdoc-xml-1.13</flexdoc.xml.home>
...
</properties>
{flexdoc-xml}/integrations/maven/plugin/
directory, depending on your OS, edit either
install.bat / install.command / install.sh
Run that command file.
First, you should set the «Permission» property of install.sh
file to allow its execution under Linux.
macOS
Since macOS has extremely tight security control, to be able running install.command
, you need to do the following:
install.command
with TextEdit (confirm in the warning box that it is OK to open it).
Then, simply resave that file via «File | Save» menu.
With that procedure, you will sign install.command
as its owner/creator, which is a precondition to be able running it!
install.command
with the executable privilege:
Run the Terminal and type in it
'chmod u+x'
followed by a space and the full pathname of the script file
(instead of typing it, just drag install.command
from the Finder into the Terminal window). Then, press Enter.
install.command
from the Finder just by clicking twice on it.
test.bat / test.command / test.sh
pom.xml
install.(bat|sh|command)
pom_with_DiagramKit.xml
install_with_DiagramKit.(bat|sh|command)
pom_with_DiagramKit.xml
is different from pom.xml
in that
{flexdoc-xml}/lib/flexdoc-xml-diagramkit.jar
"plugin-with-diagramkit"
(instead of simply "default-plugin"
, as in the case of pom.xml
)
Each command-line argument (which is either a generator option name, the option value or an input XML file) should be specified with a nested <param> element in the same order as on the FlexDoc/XML generator command-line.
The plugin will convert the specified value into the absolute pathname of the output directory, which is passed further both to Maven and to FlexDoc/XML Generator (via -d option).
The plugin will pass the specified value directly to FlexDoc/XML Generator (via -f option). It will be also converted into the absolute pathname and passed to Maven (exactly that pathname will be linked from the Maven-generated “Project Reports” page).
'generator'
,
which launches the FlexDoc/XML Generator.
You can specify this by setting 'MAVEN_OPTS'
variable in a Windows command file
that starts the Maven. For example:
MAVEN_OPTS=-Xms1024m -Xmx2048m
export MAVEN_OPTS="-Xms1024m -Xmx2048m"
The lack of memory may cause the FlexDoc/XML Generator to slow down very much
(especially, when processing a big template application like XSDDoc)
and lead eventually to java.lang.OutOfMemoryError
exception!
pom.xml
This complete working example is included in FlexDoc/XML archive prepared for downloads.
sales.xsd
that describes the structure of
sales.xml
, the data source file for the first report.
pom.xml
This complete working example is included in FlexDoc/XML archive prepared for downloads.