git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@916761 13f79535-47bb-0310-9956-ffa450edef68master
@@ -8,6 +8,8 @@ Changes that could break older environments: | |||||
* Ant no longer ships with Apache Xerces-J or the XML APIs but relies | * Ant no longer ships with Apache Xerces-J or the XML APIs but relies | ||||
on the Java runtime to provide a parser and matching API versions. | on the Java runtime to provide a parser and matching API versions. | ||||
* The stylebook ant task and the ant-stylebook.jar are removed. | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
@@ -227,10 +227,6 @@ | |||||
</or> | </or> | ||||
</selector> | </selector> | ||||
<selector id="needs.stylebook"> | |||||
<filename name="${optional.package}/StyleBook*"/> | |||||
</selector> | |||||
<selector id="needs.javamail"> | <selector id="needs.javamail"> | ||||
<or> | <or> | ||||
<filename name="${ant.package}/taskdefs/email/MimeMailer*"/> | <filename name="${ant.package}/taskdefs/email/MimeMailer*"/> | ||||
@@ -365,9 +361,6 @@ | |||||
<available property="antlr.present" | <available property="antlr.present" | ||||
classname="antlr.Tool" | classname="antlr.Tool" | ||||
classpathref="classpath"/> | classpathref="classpath"/> | ||||
<available property="stylebook.present" | |||||
classname="org.apache.stylebook.Engine" | |||||
classpathref="classpath"/> | |||||
<available property="apache.regexp.present" | <available property="apache.regexp.present" | ||||
classname="org.apache.regexp.RE" | classname="org.apache.regexp.RE" | ||||
classpathref="classpath"/> | classpathref="classpath"/> | ||||
@@ -547,7 +540,6 @@ | |||||
<selector refid="needs.commons-logging" | <selector refid="needs.commons-logging" | ||||
unless="commons.logging.present"/> | unless="commons.logging.present"/> | ||||
<selector refid="needs.apache-bsf" unless="bsf.present"/> | <selector refid="needs.apache-bsf" unless="bsf.present"/> | ||||
<selector refid="needs.stylebook" unless="stylebook.present"/> | |||||
<selector refid="needs.javamail" unless="javamail.complete"/> | <selector refid="needs.javamail" unless="javamail.complete"/> | ||||
<selector refid="needs.netrexx" unless="netrexx.present"/> | <selector refid="needs.netrexx" unless="netrexx.present"/> | ||||
<selector refid="needs.commons-net" unless="commons.net.present"/> | <selector refid="needs.commons-net" unless="commons.net.present"/> | ||||
@@ -727,7 +719,6 @@ | |||||
<selector refid="needs.apache-log4j"/> | <selector refid="needs.apache-log4j"/> | ||||
<selector refid="needs.commons-logging"/> | <selector refid="needs.commons-logging"/> | ||||
<selector refid="needs.apache-bsf"/> | <selector refid="needs.apache-bsf"/> | ||||
<selector refid="needs.stylebook"/> | |||||
<selector refid="needs.javamail"/> | <selector refid="needs.javamail"/> | ||||
<selector refid="needs.netrexx"/> | <selector refid="needs.netrexx"/> | ||||
<selector refid="needs.commons-net"/> | <selector refid="needs.commons-net"/> | ||||
@@ -767,7 +758,6 @@ | |||||
<optional-jar dep="apache-log4j"/> | <optional-jar dep="apache-log4j"/> | ||||
<optional-jar dep="commons-logging"/> | <optional-jar dep="commons-logging"/> | ||||
<optional-jar dep="apache-bsf"/> | <optional-jar dep="apache-bsf"/> | ||||
<optional-jar dep="stylebook"/> | |||||
<optional-jar dep="javamail"/> | <optional-jar dep="javamail"/> | ||||
<optional-jar dep="netrexx"/> | <optional-jar dep="netrexx"/> | ||||
<optional-jar dep="commons-net"/> | <optional-jar dep="commons-net"/> | ||||
@@ -1,89 +0,0 @@ | |||||
<!-- | |||||
Licensed to the Apache Software Foundation (ASF) under one or more | |||||
contributor license agreements. See the NOTICE file distributed with | |||||
this work for additional information regarding copyright ownership. | |||||
The ASF licenses this file to You under the Apache License, Version 2.0 | |||||
(the "License"); you may not use this file except in compliance with | |||||
the License. You may obtain a copy of the License at | |||||
http://www.apache.org/licenses/LICENSE-2.0 | |||||
Unless required by applicable law or agreed to in writing, software | |||||
distributed under the License is distributed on an "AS IS" BASIS, | |||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||||
See the License for the specific language governing permissions and | |||||
limitations under the License. | |||||
--> | |||||
<html> | |||||
<head> | |||||
<meta http-equiv="Content-Language" content="en-us"> | |||||
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> | |||||
<title>StyleBook Task</title> | |||||
</head> | |||||
<body> | |||||
<h2><a name="stylebook">Stylebook</a></h2> | |||||
<h3>Description</h3> | |||||
<strong>This task is deprecated as stylebook itself has been | |||||
deprecated by the Apache XML community.</strong> | |||||
<p>This executes the apache Stylebook documentation generator. | |||||
Unlike the commandline version of this tool, all three arguments | |||||
are required to run stylebook.</p> | |||||
<p><b>Note:</b> This task depends on external libraries not included in the Ant distribution. | |||||
See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p> | |||||
<p> | |||||
Being extended from <code><Java></code>, all the parent's attributes | |||||
and options are available. Do not set any apart from the <tt>classpath</tt> | |||||
as they are not guaranteed to be there in future. | |||||
</p> | |||||
<h3>Parameters</h3> | |||||
<table border="1" cellpadding="2" cellspacing="0"> | |||||
<tr> | |||||
<td valign="top"><b>Attribute</b></td> | |||||
<td valign="top"><b>Description</b></td> | |||||
<td align="center" valign="top"><b>Required</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">book</td> | |||||
<td valign="top">the book xml file that the documentation generation starts from | |||||
</td> | |||||
<td valign="top" align="center">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">skindirectory</td> | |||||
<td valign="top">the directory that contains the stylebook skin | |||||
</td> | |||||
<td valign="top" align="center">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">targetdirectory</td> | |||||
<td valign="top">the destination directory where the documentation is generated | |||||
</td> | |||||
<td valign="top" align="center">Yes</td> | |||||
</tr> | |||||
</table> | |||||
<p> | |||||
The user can also specify the nested <code><classpath></code> element which defines classpath | |||||
in which the task is executed.</p> | |||||
<h3>Examples</h3> | |||||
<blockquote> | |||||
<pre> | |||||
<stylebook targetdirectory="build/docs" | |||||
book="src/xdocs/book.xml" | |||||
skindirectory="src/skins/myskin"/> | |||||
</pre> | |||||
</blockquote> | |||||
The above will generate documentation in build/docs starting from the book | |||||
src/xdocs/book.xml and using the skin located in directory src/skins/myskin. | |||||
</body> | |||||
</html> | |||||
@@ -722,11 +722,6 @@ you need jakarta-oro 2.0.8 or later, and <a href="#commons-net">commons-net</a>< | |||||
<td>junitreport task</td> | <td>junitreport task</td> | ||||
<td><a href="http://xml.apache.org/xalan-j/" target="_top">http://xml.apache.org/xalan-j/</a></td> | <td><a href="http://xml.apache.org/xalan-j/" target="_top">http://xml.apache.org/xalan-j/</a></td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td>stylebook.jar</td> | |||||
<td>stylebook task</td> | |||||
<td>SVN repository of <a href="http://xml.apache.org/svn.html" target="_top">http://xml.apache.org/svn.html</a></td> | |||||
</tr> | |||||
<tr> | <tr> | ||||
<td>antlr.jar</td> | <td>antlr.jar</td> | ||||
<td>antlr task</td> | <td>antlr task</td> | ||||
@@ -81,7 +81,6 @@ | |||||
<li><a href="OptionalTasks/sshexec.html">Sshexec</a></li> | <li><a href="OptionalTasks/sshexec.html">Sshexec</a></li> | ||||
<li><a href="OptionalTasks/sshsession.html">Sshsession</a></li> | <li><a href="OptionalTasks/sshsession.html">Sshsession</a></li> | ||||
<li><a href="OptionalTasks/starteam.html">Starteam Tasks</a></li> | <li><a href="OptionalTasks/starteam.html">Starteam Tasks</a></li> | ||||
<li><a href="OptionalTasks/stylebook.html"><i>Stylebook</i></a></li> | |||||
<li><a href="OptionalTasks/symlink.html">Symlink</a></li> | <li><a href="OptionalTasks/symlink.html">Symlink</a></li> | ||||
<li><a href="OptionalTasks/telnet.html">Telnet</a></li> | <li><a href="OptionalTasks/telnet.html">Telnet</a></li> | ||||
<li><a href="OptionalTasks/translate.html">Translate</a></li> | <li><a href="OptionalTasks/translate.html">Translate</a></li> | ||||
@@ -315,12 +315,6 @@ documentation.</p> | |||||
The Javadoc2 task is deprecated; use the Javadoc task instead.</p></td> | The Javadoc2 task is deprecated; use the Javadoc task instead.</p></td> | ||||
</tr> | </tr> | ||||
<tr valign="top"> | |||||
<td nowrap><a href="OptionalTasks/stylebook.html">Stylebook</a></td> | |||||
<td><p>Executes the Apache Stylebook documentation generator. | |||||
Unlike the command-line version of this tool, all three arguments | |||||
are required to run the Stylebook task.</p></td> | |||||
</tr> | |||||
</table> | </table> | ||||
<p></p> | <p></p> | ||||
@@ -51,12 +51,11 @@ | |||||
<File DiskId="1" Id="file16" Name="ANT-NE_1.JAR" LongName="ant-netrexx.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-netrexx.jar" /> | <File DiskId="1" Id="file16" Name="ANT-NE_1.JAR" LongName="ant-netrexx.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-netrexx.jar" /> | ||||
<File DiskId="1" Id="file17" Name="ANT-NO_1.JAR" LongName="ant-nodeps.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-nodeps.jar" /> | <File DiskId="1" Id="file17" Name="ANT-NO_1.JAR" LongName="ant-nodeps.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-nodeps.jar" /> | ||||
<File DiskId="1" Id="file18" Name="ANT-ST_2.JAR" LongName="ant-starteam.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-starteam.jar" /> | <File DiskId="1" Id="file18" Name="ANT-ST_2.JAR" LongName="ant-starteam.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-starteam.jar" /> | ||||
<File DiskId="1" Id="file19" Name="ANT-ST_1.JAR" LongName="ant-stylebook.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-stylebook.jar" /> | |||||
<File DiskId="1" Id="file20" Name="ANT-SW_1.JAR" LongName="ant-swing.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-swing.jar" /> | |||||
<File DiskId="1" Id="file22" Name="ANT-WE_1.JAR" LongName="ant-weblogic.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-weblogic.jar" /> | |||||
<File DiskId="1" Id="file24" Name="ant.jar" Vital="yes" src="$(var.dist.dir)/lib\ant.jar" /> | |||||
<File DiskId="1" Id="file25" Name="LIBRAR_1.PRO" LongName="libraries.properties" Vital="yes" src="$(var.dist.dir)/lib\libraries.properties" /> | |||||
<File DiskId="1" Id="file26" Name="README" Vital="yes" src="$(var.dist.dir)/lib\README" /> | |||||
<File DiskId="1" Id="file19" Name="ANT-SW_1.JAR" LongName="ant-swing.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-swing.jar" /> | |||||
<File DiskId="1" Id="file20" Name="ANT-WE_1.JAR" LongName="ant-weblogic.jar" Vital="yes" src="$(var.dist.dir)/lib\ant-weblogic.jar" /> | |||||
<File DiskId="1" Id="file21" Name="ant.jar" Vital="yes" src="$(var.dist.dir)/lib\ant.jar" /> | |||||
<File DiskId="1" Id="file22" Name="LIBRAR_1.PRO" LongName="libraries.properties" Vital="yes" src="$(var.dist.dir)/lib\libraries.properties" /> | |||||
<File DiskId="1" Id="file23" Name="README" Vital="yes" src="$(var.dist.dir)/lib\README" /> | |||||
</Component> | </Component> | ||||
</Directory> | </Directory> | ||||
<Directory Id="directory1" Name="bin"> | <Directory Id="directory1" Name="bin"> | ||||
@@ -393,7 +392,6 @@ | |||||
<File DiskId="1" Id="file572" Name="SPLASH_1.HTM" LongName="splash.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\splash.html" /> | <File DiskId="1" Id="file572" Name="SPLASH_1.HTM" LongName="splash.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\splash.html" /> | ||||
<File DiskId="1" Id="file573" Name="SSHEXE_1.HTM" LongName="sshexec.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\sshexec.html" /> | <File DiskId="1" Id="file573" Name="SSHEXE_1.HTM" LongName="sshexec.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\sshexec.html" /> | ||||
<File DiskId="1" Id="file574" Name="STARTE_1.HTM" LongName="starteam.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\starteam.html" /> | <File DiskId="1" Id="file574" Name="STARTE_1.HTM" LongName="starteam.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\starteam.html" /> | ||||
<File DiskId="1" Id="file575" Name="STYLEB_1.HTM" LongName="stylebook.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\stylebook.html" /> | |||||
<File DiskId="1" Id="file576" Name="SYMLIN_1.HTM" LongName="symlink.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\symlink.html" /> | <File DiskId="1" Id="file576" Name="SYMLIN_1.HTM" LongName="symlink.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\symlink.html" /> | ||||
<File DiskId="1" Id="file577" Name="TELNET_1.HTM" LongName="telnet.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\telnet.html" /> | <File DiskId="1" Id="file577" Name="TELNET_1.HTM" LongName="telnet.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\telnet.html" /> | ||||
<File DiskId="1" Id="file578" Name="TRANSL_1.HTM" LongName="translate.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\translate.html" /> | <File DiskId="1" Id="file578" Name="TRANSL_1.HTM" LongName="translate.html" Vital="yes" src="$(var.dist.dir)/docs\manual\OptionalTasks\translate.html" /> | ||||
@@ -195,7 +195,6 @@ stcheckin=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin | |||||
stcheckout=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout | stcheckout=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout | ||||
stlabel=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel | stlabel=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel | ||||
stlist=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList | stlist=org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList | ||||
stylebook=org.apache.tools.ant.taskdefs.optional.StyleBook | |||||
symlink=org.apache.tools.ant.taskdefs.optional.unix.Symlink | symlink=org.apache.tools.ant.taskdefs.optional.unix.Symlink | ||||
telnet=org.apache.tools.ant.taskdefs.optional.net.TelnetTask | telnet=org.apache.tools.ant.taskdefs.optional.net.TelnetTask | ||||
translate=org.apache.tools.ant.taskdefs.optional.i18n.Translate | translate=org.apache.tools.ant.taskdefs.optional.i18n.Translate | ||||
@@ -1,123 +0,0 @@ | |||||
/* | |||||
* Licensed to the Apache Software Foundation (ASF) under one or more | |||||
* contributor license agreements. See the NOTICE file distributed with | |||||
* this work for additional information regarding copyright ownership. | |||||
* The ASF licenses this file to You under the Apache License, Version 2.0 | |||||
* (the "License"); you may not use this file except in compliance with | |||||
* the License. You may obtain a copy of the License at | |||||
* | |||||
* http://www.apache.org/licenses/LICENSE-2.0 | |||||
* | |||||
* Unless required by applicable law or agreed to in writing, software | |||||
* distributed under the License is distributed on an "AS IS" BASIS, | |||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||||
* See the License for the specific language governing permissions and | |||||
* limitations under the License. | |||||
* | |||||
*/ | |||||
package org.apache.tools.ant.taskdefs.optional; | |||||
import java.io.File; | |||||
import org.apache.tools.ant.BuildException; | |||||
import org.apache.tools.ant.taskdefs.Java; | |||||
/** | |||||
* Executes the Apache Stylebook documentation generator. | |||||
* Unlike the commandline version of this tool, all three arguments | |||||
* are required to run stylebook. | |||||
* <p> | |||||
* Being extended from <Java>, all the parent's attributes | |||||
* and options are available. Do not set any apart from the <tt>classpath</tt> | |||||
* as they are not guaranteed to be there in future. | |||||
* @todo stop extending from Java. | |||||
* @deprecated since 1.7. | |||||
* This task is considered unsupported by the Ant developers | |||||
*/ | |||||
public class StyleBook extends Java { | |||||
// CheckStyle:VisibilityModifier OFF - bc | |||||
// CheckStyle:MemberNameCheck OFF - bc | |||||
protected File m_targetDirectory; | |||||
protected File m_skinDirectory; | |||||
protected String m_loaderConfig; | |||||
protected File m_book; | |||||
// CheckStyle:MemberNameCheck ON | |||||
// CheckStyle:VisibilityModifier ON | |||||
/** | |||||
* Constructor | |||||
*/ | |||||
public StyleBook() { | |||||
setClassname("org.apache.stylebook.StyleBook"); | |||||
setFork(true); | |||||
setFailonerror(true); | |||||
} | |||||
/** | |||||
* Set the book xml file that the documentation generation starts from; | |||||
* required. | |||||
* @param book the source file | |||||
*/ | |||||
public void setBook(final File book) { | |||||
m_book = book; | |||||
} | |||||
/** | |||||
* Set the directory that contains the stylebook skin; | |||||
* required. | |||||
* @param skinDirectory the location of the stylebook skin | |||||
*/ | |||||
public void setSkinDirectory(final File skinDirectory) { | |||||
m_skinDirectory = skinDirectory; | |||||
} | |||||
/** | |||||
* Set the destination directory where the documentation is generated; | |||||
* required. | |||||
* @param targetDirectory the document output directory | |||||
*/ | |||||
public void setTargetDirectory(final File targetDirectory) { | |||||
m_targetDirectory = targetDirectory; | |||||
} | |||||
/** | |||||
* A loader configuration to send to stylebook; optional. | |||||
* @param loaderConfig the configuration to use. | |||||
*/ | |||||
public void setLoaderConfig(final String loaderConfig) { | |||||
m_loaderConfig = loaderConfig; | |||||
} | |||||
/** | |||||
* call the program | |||||
* @throws BuildException if there is a problem. | |||||
*/ | |||||
public void execute() | |||||
throws BuildException { | |||||
if (null == m_targetDirectory) { | |||||
throw new BuildException("TargetDirectory attribute not set."); | |||||
} | |||||
if (null == m_skinDirectory) { | |||||
throw new BuildException("SkinDirectory attribute not set."); | |||||
} | |||||
if (null == m_book) { | |||||
throw new BuildException("book attribute not set."); | |||||
} | |||||
createArg().setValue("targetDirectory=" + m_targetDirectory); | |||||
createArg().setValue(m_book.toString()); | |||||
createArg().setValue(m_skinDirectory.toString()); | |||||
if (null != m_loaderConfig) { | |||||
createArg().setValue("loaderConfig=" + m_loaderConfig); | |||||
} | |||||
super.execute(); | |||||
} | |||||
} |