Add encoding support for tasklist
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112997 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
dff505dcbf
commit
14a61fc50b
4 files changed
+21
-2
No files matched your search
@@ -30,6 +30,8 @@
|
||||
|
||||
<j:set var="genDocs"
|
||||
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.gen.docs')}"/>
|
||||
<j:set var="encoding"
|
||||
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.outputencoding')}"/>
|
||||
|
||||
<j:if test="${sourcesPresent == 'true'}">
|
||||
|
||||
@@ -40,6 +42,7 @@
|
||||
destDir="${genDocs}"
|
||||
template="plugin-resources/templates/tasklist.vm"
|
||||
outputFile="task-list.xml"
|
||||
encoding="${encoding}"
|
||||
/>
|
||||
|
||||
</j:if>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="$encoding"?>
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
destDir="${destDir}"
|
||||
template="${template}"
|
||||
outputFile="${outputFile}"
|
||||
encoding="${encoding}"
|
||||
/>
|
||||
</define:tag>
|
||||
</define:taglib>
|
||||
|
||||
@@ -25,9 +25,12 @@ public class VDocletBean
|
||||
/** control template */
|
||||
String template;
|
||||
|
||||
/** encoding */
|
||||
String encoding;
|
||||
|
||||
/** verbose flag */
|
||||
boolean verbose = false;
|
||||
|
||||
|
||||
/** docinfo */
|
||||
DocInfo docInfo;
|
||||
|
||||
@@ -62,6 +65,14 @@ public class VDocletBean
|
||||
{
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/**
|
||||
* encoding attribute
|
||||
*/
|
||||
public void setEncoding(String encoding)
|
||||
{
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of the Method
|
||||
@@ -114,6 +125,10 @@ public class VDocletBean
|
||||
|
||||
Generator generator = new Generator(destDir);
|
||||
generator.setAttribute("docInfo", docInfo);
|
||||
if (encoding != null)
|
||||
{
|
||||
generator.setAttribute("encoding", encoding);
|
||||
}
|
||||
generator.eval(template, new FileWriter(new File(destDir, outputFile)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user