public abstract class AbstractDocumentMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected File |
outputDirectory
The target directory to write the document back to
|
protected File |
sourceDocument
The document to perform the update on
|
| Constructor and Description |
|---|
AbstractDocumentMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected XWikiContext |
createXWikiContext() |
protected File |
getSpaceDirectory(File directory,
File document)
Return the space directory as a File for a given document in a given directory, creating the directories on the
fly if the do not exists
|
protected XWikiDocument |
loadFromXML(File file)
Loads a XWikiDocument from a XML file
|
protected void |
writeToXML(XWikiDocument doc,
File file)
Write a XWiki document to a XML file, without rendering and without versions.
|
getLog, getPluginContext, setLog, setPluginContextprotected File sourceDocument
protected File outputDirectory
public AbstractDocumentMojo()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected XWikiContext createXWikiContext() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected XWikiDocument loadFromXML(File file) throws org.apache.maven.plugin.MojoExecutionException
file - the xml file to loadorg.apache.maven.plugin.MojoExecutionExceptionprotected void writeToXML(XWikiDocument doc, File file) throws org.apache.maven.plugin.MojoExecutionException
doc - the document to write XML forfile - the file to write the document toorg.apache.maven.plugin.MojoExecutionExceptionprotected File getSpaceDirectory(File directory, File document) throws org.apache.maven.plugin.MojoExecutionException
document - the document to get space fordirectory - the directory in which the space will be writtenorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2004–2015 XWiki. All rights reserved.