se.biltmore.tools.odttoapt.maven.plugin
Class ODT2APTMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by se.biltmore.tools.odttoapt.maven.plugin.ODT2APTMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ODT2APTMojo
extends org.apache.maven.plugin.AbstractMojo

Goal which converts OpenOfficeOrg .odt documents using a special template to APT.

The easiest way to run this plugin is to put it in a profile and specify that profile when running site:site.


Nested Class Summary
 class ODT2APTMojo.ODTImageHandler
          Provides an implementatin of ImageHandler.
 
Field Summary
private  String basedir
          The basedir of the project.
private  boolean debugMode
          If true debug mode is enabled.
private  String destination
          The destination directory.
private  boolean dontFail
          If true any failure will be displayed as a warning instead of stopping build.
private  String imageAPTLinkPath
          The image APT link path.
private  String imageDestination
          The destination directory for images found in document.
private  String source
          The source directory to search for files to convert.
private  boolean verbose
          If true the currently converted file is displayed.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ODT2APTMojo()
           
 
Method Summary
 void execute()
          This is the entry point for the Mojo.
private  void odt2apt(File sourceOdtFile)
          Converts a file from odt to apt.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private String source
The source directory to search for files to convert.


destination

private String destination
The destination directory.


imageDestination

private String imageDestination
The destination directory for images found in document.


imageAPTLinkPath

private String imageAPTLinkPath
The image APT link path. That is the APT document relative path to the image.


verbose

private boolean verbose
If true the currently converted file is displayed.


debugMode

private boolean debugMode
If true debug mode is enabled.


dontFail

private boolean dontFail
If true any failure will be displayed as a warning instead of stopping build.


basedir

private String basedir
The basedir of the project. Needed to create a relative path by subtracting the basedir.

Constructor Detail

ODT2APTMojo

public ODT2APTMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
This is the entry point for the Mojo.

Throws:
org.apache.maven.plugin.MojoExecutionException

odt2apt

private void odt2apt(File sourceOdtFile)
              throws org.apache.maven.plugin.MojoExecutionException
Converts a file from odt to apt. If the source file is called UserGuide.odt the resulting file will be called UserGuide.apt and be placed under the specified destination directory.

Parameters:
sourceOdtFile - The file to convert.
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2009-2010 Biltmore Group AB. All Rights Reserved.