maven-plugins/word2html/plugin.jelly
kaz 3a77109f47 Updating some more plugins that were referring to maven.docs.dest
property from the xdoc plugin.  These have been updated to use the new
method of accessing properties in other plugins.  While cleaning this
up, I also noticed a handful of other repetitive properties in
plugin.properties files, which I also removed/cleaned.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112744 13f79535-47bb-0310-9956-ffa450edef68
2003-01-25 18:19:55 +00:00

54 lines
1.6 KiB
XML

<?xml version="1.0"?>
<project xmlns:j="jelly:core" xmlns:u="jelly:util">
<j:set var="wordSrcDir" value="${maven.word2html.src.dir}"/>
<goal name="word2html:prepare-filesystem"
description="Create directories needed for the plugin">
<j:if test="${!wordSrcDir.equals('MAVEN_WORD2HTML_SRC_DIR_NOT_SET')}">
<mkdir dir="${maven.build.dir}/docs/"/>
</j:if>
</goal>
<goal name="word2html:generate"
prereqs="xdoc:init, word2html:prepare-filesystem"
description="Generate HTML docs from Word via CScript">
<j:if test="${!wordSrcDir.equals('MAVEN_WORD2HTML_SRC_DIR_NOT_SET')}">
<echo>scanning: ${wordSrcDir}</echo>
<fileScanner var="wordFiles">
<fileset dir="${wordSrcDir}">
<patternset>
<include name="**/*.doc"/>
<exclude name="**/~*.doc"/>
</patternset>
</fileset>
</fileScanner>
<j:set var="docsDest"
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
<j:forEach var="file" items="${wordFiles.iterator()}">
<echo>Generating from ${file} to ${docsDest}</echo>
<exec executable="cscript.exe">
<arg line='"${plugin.resources}/word2html.vbs" "${file}"' />
<arg line='"${docsDest}"' />
<arg line='"${wordSrcDir}"' />
</exec>
</j:forEach>
</j:if>
</goal>
<postGoal name="site:generate">
<j:if test="${!wordSrcDir.equals('MAVEN_WORD2HTML_SRC_DIR_NOT_SET')}">
<attainGoal name="word2html:generate"/>
</j:if>
</postGoal>
</project>