@Mojo(name="compile-asciidoc",
threadSafe=false,
requiresDependencyResolution=COMPILE,
requiresProject=true,
defaultPhase=COMPILE)
public class AsciidocMojo
extends org.wisdom.maven.mojos.AbstractWisdomWatcherMojo
implements org.wisdom.maven.Constants
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
attributes |
protected String |
backend |
protected boolean |
compact |
(package private) File |
destinationForExternals |
(package private) File |
destinationForInternals |
protected String |
doctype |
protected boolean |
embedAssets |
protected String |
eruby |
protected List<String> |
extensions |
(package private) File |
externalSources |
protected boolean |
headerFooter |
protected String |
imagesDir |
(package private) org.asciidoctor.Asciidoctor |
instance |
(package private) File |
internalSources |
protected String |
sourceHighlighter |
protected String |
stylesheet |
protected String |
stylesheetDir |
protected File |
templateDir |
protected String |
templateEngine |
basedir, buildDirectory, javaHome, plugin, pluginDependencies, pluginManager, project, projectHelper, remoteRepos, repoSession, repoSystem, sessionASSETS_DIR, ASSETS_SRC_DIR, CONFIGURATION_DIR, CONFIGURATION_SRC_DIR, DEPENDENCIES_FILE, EXTRA_HEADERS_FILE, INSTRUCTIONS_FILE, MAIN_RESOURCES_DIR, MAIN_SRC_DIR, NODE_VERSION, NPM_VERSION, OSGI_PROPERTIES, TEMPLATES_DIR, TEMPLATES_SRC_DIR, TEST_RESOURCES_DIR, TEST_SRC_DIR, WISDOM_BASE_RUNTIME_ARTIFACT_ID, WISDOM_DIRECTORY_NAME, WISDOM_RUNTIME_ARTIFACT_ID| Constructor and Description |
|---|
AsciidocMojo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file) |
void |
execute() |
boolean |
fileCreated(File file) |
boolean |
fileDeleted(File file) |
boolean |
fileUpdated(File file) |
private File |
findFileInDirectory(File file,
File directory)
Searches for a file with the same name as the given file in the given directory.
|
protected org.asciidoctor.Asciidoctor |
getAsciidoctorInstance() |
private File |
getOutputHTMLFile(File input) |
protected void |
renderFile(Map<String,Object> options,
File f) |
private List<File> |
scanSourceFiles(File root) |
removeFromWatching, setSessiongetNodeManager, getWisdomRootDirectory@Parameter(property="attributes",
required=false)
protected Map<String,Object> attributes
@Parameter(property="backend",
defaultValue="html5",
required=true)
protected String backend
@Parameter(property="compact",
required=false)
protected boolean compact
@Parameter(property="doctype",
defaultValue="article",
required=true)
protected String doctype
@Parameter(property="eruby",
required=false,
defaultValue="erb")
protected String eruby
@Parameter(property="headerFooter",
required=false,
defaultValue="true")
protected boolean headerFooter
@Parameter(property="templateDir",
required=false)
protected File templateDir
@Parameter(property="templateEngine",
required=false)
protected String templateEngine
@Parameter(property="imagesDir",
required=false)
protected String imagesDir
@Parameter(property="sourceHighlighter",
required=false)
protected String sourceHighlighter
@Parameter(property="embedAssets") protected boolean embedAssets
@Parameter protected String stylesheet
@Parameter protected String stylesheetDir
File internalSources
File destinationForInternals
File externalSources
File destinationForExternals
org.asciidoctor.Asciidoctor instance
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionprotected org.asciidoctor.Asciidoctor getAsciidoctorInstance()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void renderFile(Map<String,Object> options, File f) throws IOException
IOExceptionprivate File findFileInDirectory(File file, File directory)
file - the filedirectory - the directorynull if not foundpublic boolean accept(File file)
accept in interface org.wisdom.maven.Watcherpublic boolean fileCreated(File file) throws org.wisdom.maven.WatchingException
fileCreated in interface org.wisdom.maven.Watcherorg.wisdom.maven.WatchingExceptionpublic boolean fileUpdated(File file) throws org.wisdom.maven.WatchingException
fileUpdated in interface org.wisdom.maven.Watcherorg.wisdom.maven.WatchingExceptionpublic boolean fileDeleted(File file) throws org.wisdom.maven.WatchingException
fileDeleted in interface org.wisdom.maven.Watcherorg.wisdom.maven.WatchingExceptionCopyright © 2013–2014 Wisdom Framework. All rights reserved.