conor 01/02/13 04:32:01
Modified: . WHATSNEW bootstrap.bat bootstrap.sh build.xml
docs ant_in_anger.html
lib/optional README
src/main/org/apache/tools/ant DefaultLogger.java
src/main/org/apache/tools/ant/taskdefs Available.java
Execute.java Javadoc.java Tar.java
src/main/org/apache/tools/ant/taskdefs/optional/depend
Depend.java
src/main/org/apache/tools/ant/taskdefs/optional/ejb
EJBDeploymentTool.java EjbJar.java
GenericDeploymentTool.java WLStop.java
WeblogicDeploymentTool.java
src/main/org/apache/tools/ant/taskdefs/optional/ide
VAJLoadProjects.java
src/main/org/apache/tools/ant/taskdefs/optional/junit
AggregateTransformer.java XMLResultAggregator.java
src/main/org/apache/tools/ant/types CommandlineJava.java
src/testcases/org/apache/tools/ant/types
CommandlineJavaTest.java
Added: docs/manual LICENSE coretasklist.html credits.html
develop.html dirtasks.html feedback.html ide.html
index.html install.html intro.html
optionaltasklist.html resources.html toc.html
using.html
docs/manual/CoreTasks ant.html antcall.html
antstructure.html apply.html available.html
chmod.html copy.html copydir.html copyfile.html
cvs.html delete.html deltree.html echo.html
exec.html execon.html fail.html filter.html
fixcrlf.html genkey.html get.html gunzip.html
gzip.html jar.html java.html javac.html
javadoc.html mail.html mkdir.html move.html
patch.html property.html rename.html replace.html
rmic.html signjar.html sql.html style.html tar.html
taskdef.html touch.html tstamp.html untar.html
unzip.html uptodate.html war.html zip.html
docs/manual/CoreTypes fileset.html mapper.html
patternset.html
docs/manual/Integration Antidote.html VAJAntTool.html
anttool1.gif toolmenu.gif
docs/manual/OptionalTasks antlr.html cab.html clearcase.html
depend.html dotnet.html ejb.html ftp.html
javacc.html jjtree.html jlink.html junit.html
junitreport.html mparse.html native2ascii.html
netrexxc.html perforce.html propertyfile.html
renameextensions.html script.html sound.html
stylebook.html telnet.html test.html vssget.html
Removed: docs VAJAntTool.html antlr.html anttool1.gif
clearcase.html dotnet.html ejb.html
frames-index.html frames-toc.html index.html
javacc.html jlink.html junit.html native2ascii.html
perforce.html propertyfile.html sql.html
toolmenu.gif
Log:
Merge of 1.3 branch changes into the main branch
Revision Changes Path
1.75 +23 -10 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- WHATSNEW 2001/02/02 17:03:49 1.74
+++ WHATSNEW 2001/02/13 12:31:46 1.75
@@ -1,4 +1,4 @@
-Changes from Ant 1.2 to the current sources
+Changes from Ant 1.2 to Ant 1.3 Beta 1
===========================================
Changes that could break older environments:
@@ -19,10 +19,12 @@
Other changes:
--------------
-* A GUI Frontend: Antidote. This is currently in development.
+* A GUI Frontend: Antidote. This is currently in development. At this
+ time, this is not part of the Ant release, although the source is
+ included if you are interested.
* New tasks: stylebook, propertyfile, depend, antlr, telnet, csc,
- ilasm, apply, javah, several clearcase tasks, junitreport
+ ilasm, apply, javah, several clearcase tasks, junitreport, sound
* Added output attribute to <java>.
@@ -51,10 +53,6 @@
* Style tasks will now support TraX compliant XSL processors if one is
present
in your classpath.
-* Ant now prints a warning when an attempt is made to use a property which
has
- not been set. Any build files which rely on non-set properties being passed
- through untranslated will now break.
-
* Added a failonerror to the javac task. If set to false, the build will
continue even if there are compilation errors.
@@ -66,6 +64,14 @@
* ${} property expansion will now be performed on the patterns read
from files specified as includesfile or excludesfile attributes.
+
+* The <tar> and <untar> tasks now support GNU format for handling paths
+ which are greater than 100 characters in length. In addition the <tar>
+ task now supports nested filesets through which the file permissions
+ may be controlled.
+
+* wlrun, wlstop and ejbjar now support Weblogic 6.0
+
Fixed bugs:
-----------
@@ -82,9 +88,12 @@
* ejbjar now correctly ignores <ejb-ref> elements in the deployment
descriptor.
CMP files are included by parsing the weblogic deployment descriptor
rather
than relying on the naming convention used in ant 1.2
- Include super classes and super interfaces into the generated ejb jar files
- <support> nested element allows support classes to be included in the EJB
jar
-
+
+* ejbjar includes super classes and super interfaces into the generated ejb
+ jar files. The <support> nested element allows support classes to be
+ included in the EJB jar. The toplink element should now correctly locate
+ the toplink descriptor.
+
* <vssget> now correctly deals with spaces in arguments
* <jar> fails early if a given manifest file doesn't exist
@@ -108,6 +117,10 @@
* Handle build files in directories whose name contained a "#" character
* <junit> can now log to files whose name contains a comma as well.
+
+* The AntClassLoader now refers to the loader which loaded it, any
+ requests it does not handle itself. Previously these went to the
+ primordial loader.
Changes from Ant 1.1 to Ant 1.2
===============================
1.31 +2 -2 jakarta-ant/bootstrap.bat
Index: bootstrap.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/bootstrap.bat,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- bootstrap.bat 2001/02/04 11:46:23 1.30
+++ bootstrap.bat 2001/02/13 12:31:46 1.31
@@ -21,7 +21,7 @@
if "%OS%" == "Windows_NT" if exist bootstrap rmdir/s/q bootstrap
if not "%OS%" == "Windows_NT" if exist bootstrap deltree/y bootstrap
-SET LOCALCLASSPATH=lib\parser.jar;lib\jaxp.jar
+SET LOCALCLASSPATH=lib\parser.jar;lib\jaxp.jar;lib\optional\junit.jar
if exist %JAVA_HOME%\lib\tools.jar call src\script\lcp.bat
%JAVA_HOME%\lib\tools.jar
if exist %JAVA_HOME%\lib\classes.zip call src\script\lcp.bat
%JAVA_HOME%\lib\classes.zip
@@ -29,7 +29,7 @@
set TOOLS=src\main\org\apache\tools
set CLASSDIR=classes
-SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;
+SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;%CLASSPATH%
echo JAVA_HOME=%JAVA_HOME%
echo JAVA=%JAVA%
1.43 +1 -3 jakarta-ant/bootstrap.sh
Index: bootstrap.sh
===================================================================
RCS file: /home/cvs/jakarta-ant/bootstrap.sh,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- bootstrap.sh 2001/02/04 12:00:54 1.42
+++ bootstrap.sh 2001/02/13 12:31:46 1.43
@@ -2,8 +2,6 @@
# You will need to specify JAVA_HOME if compiling with 1.2 or later.
-unset CLASSPATH
-
if [ "$JAVA_HOME" != "" ] ; then
if [ -f $JAVA_HOME/lib/tools.jar ] ; then
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
@@ -43,7 +41,7 @@
rm -r bootstrap
fi
-CLASSPATH=lib/parser.jar:lib/jaxp.jar:${CLASSPATH}
+CLASSPATH=lib/parser.jar:lib/jaxp.jar:lib/optional/junit.jar:${CLASSPATH}
TOOLS=src/main/org/apache/tools
CLASSDIR=classes
1.132 +13 -13 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- build.xml 2001/02/05 14:30:23 1.131
+++ build.xml 2001/02/13 12:31:46 1.132
@@ -15,7 +15,6 @@
<property name="Name" value="Ant"/>
<property name="name" value="ant"/>
<property name="version" value="1.4alpha"/>
- <property name="version" value="1.3beta1"/>
<property name="debug" value="false" />
<property name="deprecation" value="false" />
@@ -196,9 +195,9 @@
<exclude name="${optional.package}/perforce/*.java"
unless="jakarta.oro.present" />
<exclude name="${optional.package}/sound/*.java" unless="jmf.present"
/>
<exclude name="${optional.package}/junit/XMLResultAggregator.java"
- unless="trax.present" />
+ unless="xalan.present" />
<exclude name="${optional.package}/junit/AggregateTransformer.java"
- unless="trax.present" />
+ unless="xalan.present" />
</javac>
<copy todir="${build.classes}">
@@ -294,11 +293,11 @@
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="*.zip" />
- <exclude name="ant.jar"/>
- <exclude name="optional.jar"/>
</fileset>
</copy>
+ <copy todir="${dist.lib}" file="${lib.dir}/optional/README"/>
+
<copy todir="${dist.docs}">
<fileset dir="${docs.dir}"/>
</copy>
@@ -346,6 +345,7 @@
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="*.zip" />
+ <include name="optional/README"/>
</fileset>
</copy>
@@ -400,16 +400,16 @@
excludes="${dist.name}/lib/optional.jar"/>
<tar longfile="gnu"
tarfile="${dist.base}/${dist.name}-bin.tar">
- <fileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
+ <tarfileset dir="${dist.name}/.." mode="755" username="ant"
group="ant">
<include name="${dist.name}/bin/ant"/>
<include name="${dist.name}/bin/antRun"/>
- </fileset>
- <fileset dir="${dist.name}/.." username="ant" group="ant">
+ </tarfileset>
+ <tarfileset dir="${dist.name}/.." username="ant" group="ant">
<include name="${dist.name}/**"/>
<exclude name="${dist.name}/bin/ant"/>
<exclude name="${dist.name}/bin/antRun"/>
<exclude name="${dist.name}/lib/optional.jar"/>
- </fileset>
+ </tarfileset>
</tar>
<gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.base}/${dist.name}-bin.tar"/>
@@ -426,15 +426,15 @@
includes="${dist.name}/**"/>
<tar longfile="gnu"
tarfile="${dist.base}/${dist.name}-src.tar" >
- <fileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
+ <tarfileset dir="${dist.name}/.." mode="755" username="ant"
group="ant">
<include name="${dist.name}/bootstrap.sh"/>
<include name="${dist.name}/build.sh"/>
- </fileset>
- <fileset dir="${dist.name}/.." username="ant" group="ant">
+ </tarfileset>
+ <tarfileset dir="${dist.name}/.." username="ant" group="ant">
<include name="${dist.name}/**"/>
<exclude name="${dist.name}/bootstrap.sh"/>
<exclude name="${dist.name}/build.sh"/>
- </fileset>
+ </tarfileset>
</tar>
<gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
src="${dist.base}/${dist.name}-src.tar"/>
1.3 +22 -22 jakarta-ant/docs/ant_in_anger.html
Index: ant_in_anger.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/ant_in_anger.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ant_in_anger.html 2001/01/29 01:19:59 1.2
+++ ant_in_anger.html 2001/02/13 12:31:47 1.3
@@ -106,7 +106,7 @@
With standard target names, it is easy to build encompassing ant build
files which just hand off the work to the classes below using the
-<a href="index.html#ant">ant</a>
+<a href="manual/CoreTasks/ant.html">ant</a>
task. For example. the clean target could be handed down to the intf and
impl subdirectories from a parent directory
@@ -126,9 +126,9 @@
</h3>
If ant does not do what you want, you can use the
-<a href="index.html#exec">exec</a> and
-<a href="index.html#java">java</a> tasks or
-<a href="index.html#script">inline scripting</a> to extend it. In a
+<a href="manual/CoreTasks/exec.html">exec</a> and
+<a href="manual/CoreTasks/java.html">java</a> tasks or
+<a href="manual/OptionalTasks/script.html">inline scripting</a> to extend
it. In a
project with many build.xml files, you soon find that having a single
central place for implementing the functionality keeps maintenance
overhead down. Implementing task extensions through java code seems
@@ -153,7 +153,7 @@
<b>(alternatively "recriminate early, recriminate often")</b>
<p>
-Ant lets you call <a href="junit.html">JUnit</a> tasks, which unit test
+Ant lets you call <a href="manual/OptionalTasks/junit.html">JUnit</a> tasks,
which unit test
the code your team has written. Automated testing may seem like extra
work at first, but JUnit makes writing unit tests so easy that you have
almost no reason not to. Invest the time in learning how to use
@@ -175,7 +175,7 @@
System tests are harder to automate than unit tests, but if you can
write java code to stress large portions of the system -even if the code
-can not run as JUnit tasks- then the <a href= "index.html#java">java</a>
+can not run as JUnit tasks- then the <a href=
"manual/CoreTasks/java.html">java</a>
task can be used to invoke them. It is best to specify that you want a
new JVM for these tests, so that a significant crash does not break the
full build.
@@ -198,8 +198,8 @@
tools (exec tasks) which are not portable, path issues, and hard coding
in the location of things.
-<h3>Command Line apps: <a href="index.html#exec">Exec</a>/ <a href=
-"index.html#execon">ExecOn</a></h3>
+<h3>Command Line apps: <a href="manual/CoreTasks/exec.html">Exec</a>/ <a
href=
+"manual/CoreTasks/execon.html">ExecOn</a></h3>
The trouble with external invocation is that not all functions are found
cross platform, and those that are often have different names -DOS
@@ -260,14 +260,14 @@
<p>
-Some tasks only work on one platform -<a href= "index.html#chmod">
+Some tasks only work on one platform -<a href= "manual/CoreTasks/chmod.html">
Chmod</a> being a classic example. These tasks usually result in just a
warning message on an unsupported platform -the rest of the target's
tasks will still be called. Other tasks degrade their functionality on
platforms or Java versions. In particular, any task which adjusts the
timestamp of files can not do so properly on Java 1.1. Tasks which can
-do that - <a href="index.html#get">Get<a>, <a
-href="index.html#touch">Touch</a> and <A href="index.html#unzip">
+do that - <a href="manual/CoreTasks/get.html">Get<a>, <a
+href="manual/CoreTasks/touch.html">Touch</a> and <A
href="manual/CoreTasks/unzip.html">
Unjar/Unwar/Unzip</a> for example, degrade their functionality on
Java1.1, usually resorting to the current timestamp instead.
@@ -318,14 +318,14 @@
many people have put in the effort to make the tasks easier.
<p>
-Ant can <a href="index.html#jar">Jar</a>, <a href= "index.html#tar">
-Tar</a> or <a href="index.html#zip">Zip</a> files for deployment, while
-the <a href="index.html#war">War</a> task extends the jar task for
+Ant can <a href="manual/CoreTasks/jar.html">Jar</a>, <a href=
"manual/CoreTasks/tar.html">
+Tar</a> or <a href="manual/CoreTasks/zip.html">Zip</a> files for deployment,
while
+the <a href="manual/CoreTasks/war.html">War</a> task extends the jar task for
better servlet deployment. <a href = "jlink.html" >Jlink</a> is a jar
generation file which lets you merge multiple sub jars. This is ideal
for a build process in which separate jars are generated by sub
projects, yet the final output is a merged jar. <a href=
-"index.html#cab">Cab</a> can be used on Win32 boxes to build a cab file
+"manual/OptionalTasks/cab.html">Cab</a> can be used on Win32 boxes to build
a cab file
which is useful if you have to target IE deployment.
<p>
@@ -333,7 +333,7 @@
The <a href = "index.html#ftp">ftp</a> task lets you move stuff up to a
server. Beware of putting the ftp password in the build file -a property
file with tight access control is slightly better. The <a href=
-"index.html#fixcrlf">FixCRLF task</a> is often a useful interim step if
+"manual/CoreTasks/fixcrlf.html">FixCRLF task</a> is often a useful interim
step if
you need to ensure that files have unix file extensions before upload. A
WebDav task has long been discussed, which would provide a more secure
upload to web servers, but it is still in the todo list. If DAV is your
@@ -341,7 +341,7 @@
<p>
-EJB deployment is aided by the <a href="ejb.html">ejb tasks</a>. At the
+EJB deployment is aided by the <a href="manual/OptionalTasks/ejb.html">ejb
tasks</a>. At the
time of writing, only WebLogic was supported with these tasks -if your
EJB server is not supported, extending the ejb tasks would benefit your
project and the rest of the ant community.
@@ -349,9 +349,9 @@
<p>
Finally, there are of course the fallbacks of just copying files to a
-destination using <a href="index.html#copy">Copy</a> and <a href =
+destination using <a href="manual/CoreTasks/copy.html">Copy</a> and <a href =
"index.html#copydir">Copydir</a> , or just sending them to a person or
-process using <a href= "index.html#mail">Mail</a>.
+process using <a href= "manual/CoreTasks/mail.html">Mail</a>.
<a name="directories">
<h2> Directory Structures</h2>
@@ -527,7 +527,7 @@
get
</b><dd>
-The <a href="index.html#get">get</a> task can fetch any URL, so be used
+The <a href="manual/CoreTasks/get.html">get</a> task can fetch any URL, so
be used
to trigger remote server side code during the build process, from remote
server restarts to sending SMS/pager messages to the developer
cellphones
@@ -538,7 +538,7 @@
Internationalisation is always trouble. Ant helps here with the <A href=
-"native2ascii.html">native2ascii</a> task which can escape out all non
+"manual/OptionalTasks/native2ascii.html">native2ascii</a> task which can
escape out all non
ascii characters into unicode. You can use this to write java files
which include strings (and indeed comments) in your own non-ASCII
language and then use native2ascii to convert to ascii prior to feeding
@@ -604,7 +604,7 @@
</b><dd>
XSLT can be used to dynamically generate build.xml files from a source
-xml file, with the <a href="index.html#style">Style</a> task controlling
+xml file, with the <a href="manual/CoreTasks/style.html">Style</a> task
controlling
the transform. This is the current recommended strategy for creating
complex build files dynamically.
1.2 +48 -0 jakarta-ant/docs/manual/LICENSE
1.2 +70 -0 jakarta-ant/docs/manual/coretasklist.html
1.2 +45 -0 jakarta-ant/docs/manual/credits.html
1.2 +204 -0 jakarta-ant/docs/manual/develop.html
1.2 +168 -0 jakarta-ant/docs/manual/dirtasks.html
1.2 +31 -0 jakarta-ant/docs/manual/feedback.html
1.2 +23 -0 jakarta-ant/docs/manual/ide.html
1.2 +17 -0 jakarta-ant/docs/manual/index.html
1.2 +378 -0 jakarta-ant/docs/manual/install.html
1.2 +54 -0 jakarta-ant/docs/manual/intro.html
1.2 +40 -0 jakarta-ant/docs/manual/optionaltasklist.html
1.2 +25 -0 jakarta-ant/docs/manual/resources.html
1.2 +26 -0 jakarta-ant/docs/manual/toc.html
1.2 +468 -0 jakarta-ant/docs/manual/using.html
1.2 +69 -0 jakarta-ant/docs/manual/CoreTasks/ant.html
1.2 +49 -0 jakarta-ant/docs/manual/CoreTasks/antcall.html
1.2 +43 -0 jakarta-ant/docs/manual/CoreTasks/antstructure.html
1.2 +131 -0 jakarta-ant/docs/manual/CoreTasks/apply.html
1.2 +91 -0 jakarta-ant/docs/manual/CoreTasks/available.html
1.2 +122 -0 jakarta-ant/docs/manual/CoreTasks/chmod.html
1.2 +121 -0 jakarta-ant/docs/manual/CoreTasks/copy.html
1.2 +120 -0 jakarta-ant/docs/manual/CoreTasks/copydir.html
1.2 +59 -0 jakarta-ant/docs/manual/CoreTasks/copyfile.html
1.2 +97 -0 jakarta-ant/docs/manual/CoreTasks/cvs.html
1.2 +110 -0 jakarta-ant/docs/manual/CoreTasks/delete.html
1.2 +40 -0 jakarta-ant/docs/manual/CoreTasks/deltree.html
1.2 +51 -0 jakarta-ant/docs/manual/CoreTasks/echo.html
1.2 +144 -0 jakarta-ant/docs/manual/CoreTasks/exec.html
1.2 +138 -0 jakarta-ant/docs/manual/CoreTasks/execon.html
1.2 +50 -0 jakarta-ant/docs/manual/CoreTasks/fail.html
1.2 +63 -0 jakarta-ant/docs/manual/CoreTasks/filter.html
1.2 +168 -0 jakarta-ant/docs/manual/CoreTasks/fixcrlf.html
1.2 +103 -0 jakarta-ant/docs/manual/CoreTasks/genkey.html
1.2 +77 -0 jakarta-ant/docs/manual/CoreTasks/get.html
1.2 +59 -0 jakarta-ant/docs/manual/CoreTasks/gunzip.html
1.2 +42 -0 jakarta-ant/docs/manual/CoreTasks/gzip.html
1.2 +150 -0 jakarta-ant/docs/manual/CoreTasks/jar.html
1.2 +135 -0 jakarta-ant/docs/manual/CoreTasks/java.html
1.2 +250 -0 jakarta-ant/docs/manual/CoreTasks/javac.html
1.2 +464 -0 jakarta-ant/docs/manual/CoreTasks/javadoc.html
1.2 +64 -0 jakarta-ant/docs/manual/CoreTasks/mail.html
1.2 +38 -0 jakarta-ant/docs/manual/CoreTasks/mkdir.html
1.2 +117 -0 jakarta-ant/docs/manual/CoreTasks/move.html
1.2 +77 -0 jakarta-ant/docs/manual/CoreTasks/patch.html
1.2 +129 -0 jakarta-ant/docs/manual/CoreTasks/property.html
1.2 +49 -0 jakarta-ant/docs/manual/CoreTasks/rename.html
1.2 +164 -0 jakarta-ant/docs/manual/CoreTasks/replace.html
1.2 +158 -0 jakarta-ant/docs/manual/CoreTasks/rmic.html
1.2 +91 -0 jakarta-ant/docs/manual/CoreTasks/signjar.html
1.2 +223 -0 jakarta-ant/docs/manual/CoreTasks/sql.html
1.2 +152 -0 jakarta-ant/docs/manual/CoreTasks/style.html
1.2 +168 -0 jakarta-ant/docs/manual/CoreTasks/tar.html
1.2 +56 -0 jakarta-ant/docs/manual/CoreTasks/taskdef.html
1.2 +57 -0 jakarta-ant/docs/manual/CoreTasks/touch.html
1.2 +75 -0 jakarta-ant/docs/manual/CoreTasks/tstamp.html
1.2 +52 -0 jakarta-ant/docs/manual/CoreTasks/untar.html
1.2 +45 -0 jakarta-ant/docs/manual/CoreTasks/unzip.html
1.2 +62 -0 jakarta-ant/docs/manual/CoreTasks/uptodate.html
1.2 +149 -0 jakarta-ant/docs/manual/CoreTasks/war.html
1.2 +161 -0 jakarta-ant/docs/manual/CoreTasks/zip.html
1.2 +92 -0 jakarta-ant/docs/manual/CoreTypes/fileset.html
1.2 +335 -0 jakarta-ant/docs/manual/CoreTypes/mapper.html
1.2 +84 -0 jakarta-ant/docs/manual/CoreTypes/patternset.html
1.2 +253 -0 jakarta-ant/docs/manual/Integration/Antidote.html
1.2 +135 -0 jakarta-ant/docs/manual/Integration/VAJAntTool.html
1.2 +25 -0 jakarta-ant/docs/manual/Integration/anttool1.gif
<<Binary file>>
1.2 +59 -0 jakarta-ant/docs/manual/Integration/toolmenu.gif
<<Binary file>>
1.2 +78 -0 jakarta-ant/docs/manual/OptionalTasks/antlr.html
1.2 +130 -0 jakarta-ant/docs/manual/OptionalTasks/cab.html
1.2 +258 -0 jakarta-ant/docs/manual/OptionalTasks/clearcase.html
1.2 +163 -0 jakarta-ant/docs/manual/OptionalTasks/depend.html
1.2 +473 -0 jakarta-ant/docs/manual/OptionalTasks/dotnet.html
1.2 +857 -0 jakarta-ant/docs/manual/OptionalTasks/ejb.html
1.2 +224 -0 jakarta-ant/docs/manual/OptionalTasks/ftp.html
1.2 +182 -0 jakarta-ant/docs/manual/OptionalTasks/javacc.html
1.2 +178 -0 jakarta-ant/docs/manual/OptionalTasks/jjtree.html
1.2 +138 -0 jakarta-ant/docs/manual/OptionalTasks/jlink.html
1.2 +332 -0 jakarta-ant/docs/manual/OptionalTasks/junit.html
1.2 +118 -0 jakarta-ant/docs/manual/OptionalTasks/junitreport.html
1.2 +83 -0 jakarta-ant/docs/manual/OptionalTasks/mparse.html
1.2 +135 -0 jakarta-ant/docs/manual/OptionalTasks/native2ascii.html
1.2 +277 -0 jakarta-ant/docs/manual/OptionalTasks/netrexxc.html
1.2 +355 -0 jakarta-ant/docs/manual/OptionalTasks/perforce.html
1.2 +156 -0 jakarta-ant/docs/manual/OptionalTasks/propertyfile.html
1.2 +108 -0
jakarta-ant/docs/manual/OptionalTasks/renameextensions.html
1.2 +121 -0 jakarta-ant/docs/manual/OptionalTasks/script.html
1.2 +95 -0 jakarta-ant/docs/manual/OptionalTasks/sound.html
1.2 +63 -0 jakarta-ant/docs/manual/OptionalTasks/stylebook.html
1.2 +100 -0 jakarta-ant/docs/manual/OptionalTasks/telnet.html
1.2 +72 -0 jakarta-ant/docs/manual/OptionalTasks/test.html
1.2 +91 -0 jakarta-ant/docs/manual/OptionalTasks/vssget.html
1.2 +2 -15 jakarta-ant/lib/optional/README
Index: README
===================================================================
RCS file: /home/cvs/jakarta-ant/lib/optional/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README 2001/01/23 05:10:36 1.1
+++ README 2001/02/13 12:31:57 1.2
@@ -1,15 +1,2 @@
-The required libraries should be placed here.
-
-The dependencies are:
-
-junit.jar - required for junit tasks, available at www.junit.org
-stylebook.jar - required by stylebook task, available in CVS repository of
xml.apache.org
-testlet.jar - required for test task, available with Avalon via
java.apache.org/framework
-jakarta-regexp-1.2.jar - required by some mappers, available at
http://jakarta.apache.org/regexp/
-jakarta-oro-2.0.1.jar - required for some mappers and the perforce tasks,
available at http://jakarta.apache.org/oro/
-???antlr.jar???- required for antlr task, available at www.antlr.org
-bsf.jar - required for script task, available at
http://oss.software.ibm.com/developerworks/opensource/bsf/
-netrexx.jar - required for netrexx task, available at
http://www2.hursley.ibm.com/netrexx
-rhino.jar - required for script task if you want to use javascript,
available at www.mozilla.org
-jpython.jar - required for script task if you want to use python,
available at www.jpython.org
-netcomponents.jar - required by ftp and telnet tasks, available at
http://www.savarese.org/oro/downloads/index.html#NetComponents
+Please refer to the Ant manual under Installing Ant / Library Dependencies
for a list
+of the jar requirements for various optional tasks and features.
1.14 +1 -11
jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java
Index: DefaultLogger.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DefaultLogger.java 2001/01/11 12:13:02 1.13
+++ DefaultLogger.java 2001/02/13 12:31:58 1.14
@@ -138,17 +138,7 @@
else {
err.println(lSep + "BUILD FAILED" + lSep);
- if (error instanceof BuildException) {
- err.println(error.toString());
-
- Throwable nested = ((BuildException)error).getException();
- if (nested != null) {
- nested.printStackTrace(err);
- }
- }
- else {
- error.printStackTrace(err);
- }
+ error.printStackTrace(err);
}
out.println(lSep + "Total time: " +
formatTime(System.currentTimeMillis() - startTime));
1.18 +14 -5
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
Index: Available.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Available.java 2001/02/03 14:07:34 1.17
+++ Available.java 2001/02/13 12:31:58 1.18
@@ -129,9 +129,20 @@
this.loader = new AntClassLoader(project, classpath, false);
}
- if ((classname != null) && !checkClass(classname)) return;
- if ((file != null) && !checkFile(file)) return;
- if ((resource != null) && !checkResource(resource)) return;
+ if ((classname != null) && !checkClass(classname)) {
+ log("Unable to load class " + classname + " to set property " +
property, Project.MSG_VERBOSE);
+ return;
+ }
+
+ if ((file != null) && !checkFile(file)) {
+ log("Unable to find file " + file + " to set property " +
property, Project.MSG_VERBOSE);
+ return;
+ }
+
+ if ((resource != null) && !checkResource(resource)) {
+ log("Unable to load resource " + resource + " to set property "
+ property, Project.MSG_VERBOSE);
+ return;
+ }
this.project.setProperty(property, value);
}
@@ -170,10 +181,8 @@
}
return true;
} catch (ClassNotFoundException e) {
- log("Class not found: " + classname, Project.MSG_VERBOSE);
return false;
} catch (NoClassDefFoundError e) {
- log("Class cound not be loaded: " + classname,
Project.MSG_VERBOSE);
return false;
}
}
1.13 +6 -0
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
Index: Execute.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Execute.java 2001/01/12 14:08:50 1.12
+++ Execute.java 2001/02/13 12:31:58 1.13
@@ -428,6 +428,8 @@
*/
public Process exec(Project project, String[] cmd, String[] env)
throws IOException
{
+ project.log("Execute:CommandLauncher: " +
+ Commandline.toString(cmd), Project.MSG_DEBUG);
return Runtime.getRuntime().exec(cmd, env);
}
@@ -469,6 +471,8 @@
for ( int i = 0; i < cmd.length; i++ ) {
newcmd[i] = Commandline.quoteArgument(cmd[i]);
}
+ project.log("Execute:Java11CommandLauncher: " +
+ Commandline.toString(newcmd), Project.MSG_DEBUG);
return Runtime.getRuntime().exec(newcmd, env);
}
}
@@ -493,6 +497,8 @@
throws IOException
{
try {
+ project.log("Execute:Java13CommandLauncher: " +
+ Commandline.toString(cmd), Project.MSG_DEBUG);
Object[] arguments = { cmd, env, workingDir };
return (Process)_execWithCWD.invoke(Runtime.getRuntime(),
arguments);
}
1.44 +28 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- Javadoc.java 2001/01/24 16:56:46 1.43
+++ Javadoc.java 2001/02/13 12:31:58 1.44
@@ -193,6 +193,7 @@
private File destDir = null;
private String sourceFiles = null;
private String packageNames = null;
+ private String excludePackageNames = null;
private boolean author = true;
private boolean version = true;
private DocletInfo doclet = null;
@@ -260,6 +261,11 @@
public void setPackagenames(String src) {
packageNames = src;
}
+
+ public void setExcludePackageNames(String src) {
+ excludePackageNames = src;
+ }
+
public void setOverview(File f) {
if (!javadoc1) {
cmd.createArgument().setValue("-overview");
@@ -722,8 +728,16 @@
toExecute.createArgument().setValue(name);
}
}
+
+ Vector excludePackages = new Vector();
+ if ((excludePackageNames != null) &&
(excludePackageNames.length() > 0)) {
+ StringTokenizer exTok = new
StringTokenizer(excludePackageNames, ",", false);
+ while (exTok.hasMoreTokens()) {
+
excludePackages.addElement(exTok.nextToken().trim());
+ }
+ }
if (packages.size() > 0) {
- evaluatePackages(toExecute, sourcePath, packages);
+ evaluatePackages(toExecute, sourcePath, packages,
excludePackages);
}
}
@@ -770,9 +784,10 @@
* patterns.
*/
private void evaluatePackages(Commandline toExecute, Path sourcePath,
- Vector packages) {
+ Vector packages, Vector excludePackages) {
log("Source path = " + sourcePath.toString(), Project.MSG_VERBOSE);
log("Packages = " + packages, Project.MSG_VERBOSE);
+ log("Exclude Packages = " + excludePackages,
Project.MSG_VERBOSE);
Vector addedPackages = new Vector();
@@ -792,6 +807,17 @@
fs.createInclude().setName(pkg);
} // while
+
+ e = excludePackages.elements();
+ while (e.hasMoreElements()) {
+ String pkg = (String)e.nextElement();
+ pkg = pkg.replace('.','/');
+ if (pkg.endsWith("*")) {
+ pkg += "*";
+ }
+
+ fs.createExclude().setName(pkg);
+ }
for (int j=0; j<list.length; j++) {
File source = project.resolveFile(list[j]);
1.12 +11 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Tar.java 2001/02/10 15:13:09 1.11
+++ Tar.java 2001/02/13 12:31:58 1.12
@@ -84,7 +84,7 @@
Vector filesets = new Vector();
Vector fileSetFiles = new Vector();
- public TarFileSet createFileSet() {
+ public TarFileSet createTarFileSet() {
TarFileSet fileset = new TarFileSet();
filesets.addElement(fileset);
return fileset;
@@ -121,6 +121,16 @@
public void execute() throws BuildException {
if (tarFile == null) {
throw new BuildException("tarfile attribute must be set!",
+ location);
+ }
+
+ if (tarFile.exists() && tarFile.isDirectory()) {
+ throw new BuildException("tarfile is a directory!",
+ location);
+ }
+
+ if (tarFile.exists() && !tarFile.canWrite()) {
+ throw new BuildException("Can not write to the specified
tarfile!",
location);
}
1.6 +1 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
Index: Depend.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Depend.java 2001/01/03 15:18:23 1.5
+++ Depend.java 2001/02/13 12:31:59 1.6
@@ -110,7 +110,7 @@
* beyond direct dependencies to include all classes. So if A directly
* affects B abd B directly affects C, then A indirectly affects C.
*/
- private boolean closure;
+ private boolean closure = false;
private void writeDependencyList(File depFile, Vector dependencyList)
throws IOException {
// new dependencies so need to write them out to the cache
1.8 +0 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java
Index: EJBDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EJBDeploymentTool.java 2001/01/25 14:39:16 1.7
+++ EJBDeploymentTool.java 2001/02/13 12:31:59 1.8
@@ -69,8 +69,6 @@
*
* @param descriptorFilename the name of the deployment descriptor
* @param saxParser a SAX parser which can be used to parse the
deployment descriptor.
- * @param supportFileSet a fileset containing all the files to be
included in the
- * ` generated jarfile as support classes.
*/
public void processDescriptor(String descriptorFilename, SAXParser
saxParser)
throws BuildException;
1.14 +5 -4
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
Index: EjbJar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- EjbJar.java 2001/01/25 14:39:16 1.13
+++ EjbJar.java 2001/02/13 12:31:59 1.14
@@ -103,7 +103,7 @@
*/
public class EjbJar extends MatchingTask {
- static class DTDLocation {
+ public static class DTDLocation {
private String publicId;
private String location;
@@ -155,7 +155,7 @@
/**
* A Fileset of support classes
*/
- public FileSet supportFileSet = null;
+ public List supportFileSets = new ArrayList();
/**
* The list of configured DTD locations
@@ -238,8 +238,9 @@
* @return a fileset which can be populated with support files.
*/
public FileSet createSupport() {
- config.supportFileSet = new FileSet();
- return config.supportFileSet;
+ FileSet supportFileSet = new FileSet();
+ config.supportFileSets.add(supportFileSet);
+ return supportFileSet;
}
1.14 +15 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Index: GenericDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- GenericDeploymentTool.java 2001/01/25 14:39:16 1.13
+++ GenericDeploymentTool.java 2001/02/13 12:31:59 1.14
@@ -289,14 +289,15 @@
Hashtable ejbFiles = handler.getFiles();
// add in support classes if any
- if (config.supportFileSet != null) {
- Project project = task.getProject();
- File supportBaseDir = config.supportFileSet.getDir(project);
- DirectoryScanner supportScanner =
config.supportFileSet.getDirectoryScanner(project);
+ Project project = task.getProject();
+ for (Iterator i = config.supportFileSets.iterator();
i.hasNext();) {
+ FileSet supportFileSet = (FileSet)i.next();
+ File supportBaseDir = supportFileSet.getDir(project);
+ DirectoryScanner supportScanner =
supportFileSet.getDirectoryScanner(project);
supportScanner.scan();
String[] supportFiles = supportScanner.getIncludedFiles();
- for (int i = 0; i < supportFiles.length; ++i) {
- ejbFiles.put(supportFiles[i], new File(supportBaseDir,
supportFiles[i]));
+ for (int j = 0; j < supportFiles.length; ++j) {
+ ejbFiles.put(supportFiles[j], new File(supportBaseDir,
supportFiles[j]));
}
}
@@ -455,9 +456,16 @@
jarfile.getParentFile().mkdirs();
jarfile.createNewFile();
+ String defaultManifest =
"/org/apache/tools/ant/defaultManifest.mf";
+ InputStream in =
this.getClass().getResourceAsStream(defaultManifest);
+ if ( in == null ) {
+ throw new BuildException ( "Could not find: " +
defaultManifest );
+ }
+
+ Manifest manifest = new Manifest(in);
// Create the streams necessary to write the jarfile
- jarStream = new JarOutputStream(new FileOutputStream(jarfile));
+ jarStream = new JarOutputStream(new FileOutputStream(jarfile),
manifest);
jarStream.setMethod(JarOutputStream.DEFLATED);
// Loop through all the class files found and add them to the jar
1.7 +14 -6
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
Index: WLStop.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WLStop.java 2001/02/04 08:34:38 1.6
+++ WLStop.java 2001/02/13 12:31:59 1.7
@@ -72,7 +72,7 @@
/**
* The classpath to be used. It must contains the weblogic.Admin class.
*/
- private String classpath;
+ private Path classpath;
/**
* The weblogic username to use to request the shutdown.
@@ -116,8 +116,6 @@
if (serverURL == null) {
throw new BuildException("The url of the weblogic server must be
provided.");
}
-
- String execClassPath = project.translatePath(classpath);
Java weblogicAdmin = (Java)project.createTask("java");
weblogicAdmin.setFork(true);
@@ -135,7 +133,7 @@
}
weblogicAdmin.setArgs(args);
- weblogicAdmin.setClasspath(new Path(project, execClassPath));
+ weblogicAdmin.setClasspath(classpath);
weblogicAdmin.execute();
}
@@ -144,10 +142,20 @@
*
* @param s the classpath to use when executing the weblogic admin task.
*/
- public void setClasspath(String s) {
- this.classpath = project.translatePath(s);
+ public void setClasspath(Path path) {
+ this.classpath = path;
}
+ /**
+ * Add the classpath for the user classes
+ */
+ public Path createClasspath() {
+ if (classpath == null) {
+ classpath = new Path(project);
+ }
+ return classpath.createPath();
+ }
+
/**
* Set the username to use to request shutdown of the server.
*
1.17 +27 -10
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Index: WeblogicDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- WeblogicDeploymentTool.java 2001/02/04 08:30:44 1.16
+++ WeblogicDeploymentTool.java 2001/02/13 12:31:59 1.17
@@ -112,10 +112,10 @@
/**
* Indicates if the old CMP location convention is to be used.
*/
- private boolean oldCMP = true;
+ private boolean newCMP = false;
/** The classpath to the weblogic classes. */
- private Path wlClasspath;
+ private Path wlClasspath = null;
/**
* Get the classpath to the weblogic classpaths
@@ -126,6 +126,10 @@
}
return wlClasspath.createPath();
}
+
+ public void setWLClasspath(Path wlClasspath) {
+ this.wlClasspath = wlClasspath;
+ }
/**
* The compiler (switch <code>-compiler</code>) to use
@@ -203,8 +207,16 @@
this.ejb11DTD = inString;
}
+ /**
+ * Set the value of the oldCMP scheme. This is an antonym for
+ * newCMP
+ */
+ public void setOldCMP(boolean oldCMP) {
+ this.newCMP = !oldCMP;
+ }
+
/**
- * Set the value of the oldCMP scheme. The oldCMP scheme locates the
+ * Set the value of the newCMP scheme. The old CMP scheme locates the
* weblogic CMP descriptor based on the naming convention where the
* weblogic CMP file is expected to be named with the bean name as the
prefix.
*
@@ -212,10 +224,9 @@
* actually used in the main weblogic EJB descriptor. Also, descriptors
which
* contain multiple CMP references could not be used.
*
- * The old scheme is currently the default, but is also deprecated.
*/
- public void setOldCMP(boolean oldCMP) {
- this.oldCMP = oldCMP;
+ public void setNewCMP(boolean newCMP) {
+ this.newCMP = newCMP;
}
@@ -237,7 +248,7 @@
return handler;
}
- protected DescriptorHandler getWeblogicDescriptorHandler(File srcDir) {
+ protected DescriptorHandler getWeblogicDescriptorHandler(final File
srcDir) {
DescriptorHandler handler =
new DescriptorHandler(srcDir) {
protected void processElement() {
@@ -247,7 +258,8 @@
//trim the META_INF\ off of the file name
String fileName =
fileNameWithMETA.substring(META_DIR.length(),
fileNameWithMETA.length() );
- File descriptorFile = new
File(getConfig().descriptorDir, fileName);
+ File descriptorFile = new File(srcDir, fileName);
+
ejbFiles.put(fileNameWithMETA, descriptorFile);
}
}
@@ -255,6 +267,11 @@
handler.registerDTD(PUBLICID_WEBLOGIC_EJB,
weblogicDTD == null ? DEFAULT_WL_DTD_LOCATION :
weblogicDTD);
+
+ for (Iterator i = getConfig().dtdLocations.iterator(); i.hasNext();)
{
+ EjbJar.DTDLocation dtdLocation = (EjbJar.DTDLocation)i.next();
+ handler.registerDTD(dtdLocation.getPublicId(),
dtdLocation.getLocation());
+ }
return handler;
}
@@ -277,9 +294,9 @@
return;
}
- if (oldCMP) {
+ if (!newCMP) {
log("The old method for locating CMP files has been
DEPRECATED.", Project.MSG_VERBOSE);
- log("Please adjust your weblogic descriptor and set
oldCMP=\"false\" " +
+ log("Please adjust your weblogic descriptor and set
newCMP=\"true\" " +
"to use the new CMP descriptor inclusion mechanism. ",
Project.MSG_VERBOSE);
// The the weblogic cmp deployment descriptor
File weblogicCMPDD = new File(getConfig().descriptorDir,
ddPrefix + WL_CMP_DD);
1.5 +1 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
Index: VAJLoadProjects.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- VAJLoadProjects.java 2001/01/03 14:18:41 1.4
+++ VAJLoadProjects.java 2001/02/13 12:32:00 1.5
@@ -130,7 +130,7 @@
/**
* Add a project description entry on the project list.
*/
- public VAJProjectDescription createProject() {
+ public VAJProjectDescription createVAJProject() {
VAJProjectDescription d = new VAJProjectDescription();
projectDescriptions.addElement(d);
return d;
1.2 +24 -29
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
Index: AggregateTransformer.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AggregateTransformer.java 2001/02/02 17:03:56 1.1
+++ AggregateTransformer.java 2001/02/13 12:32:00 1.2
@@ -68,13 +68,10 @@
import java.util.Enumeration;
import java.util.Hashtable;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
+import org.apache.xalan.xslt.XSLTProcessorFactory;
+import org.apache.xalan.xslt.XSLTProcessor;
+import org.apache.xalan.xslt.XSLTInputSource;
+import org.apache.xalan.xslt.XSLTResultTarget;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
@@ -169,9 +166,6 @@
/** XML Parser factory */
protected static final DocumentBuilderFactory dbfactory =
DocumentBuilderFactory.newInstance();
- /** XSL Parser factory */
- protected static final TransformerFactory tfactory =
TransformerFactory.newInstance();
-
public AggregateTransformer(Task task){
this.task = task;
}
@@ -268,7 +262,7 @@
}
/** create a single page summary */
- protected void createSinglePageSummary(Element root) throws IOException,
TransformerException {
+ protected void createSinglePageSummary(Element root) throws IOException,
SAXException {
transform(root, OVERVIEW_SUMMARY + ".xsl", OVERVIEW_SUMMARY +
getExtension());
}
@@ -286,7 +280,7 @@
}
}
- protected void createCascadingStyleSheet() throws IOException,
TransformerException {
+ protected void createCascadingStyleSheet() throws IOException,
SAXException {
if (styleDir == null) {
InputStream in = getResourceAsStream("html/stylesheet.css");
OutputStream out = new FileOutputStream( new File(toDir,
"stylesheet.css"));
@@ -294,7 +288,7 @@
}
}
- protected void createFrameStructure() throws IOException,
TransformerException{
+ protected void createFrameStructure() throws IOException, SAXException{
if (styleDir == null) {
InputStream in = getResourceAsStream("html/index.html");
OutputStream out = new FileOutputStream( new File(toDir,
"index.html") );
@@ -306,7 +300,7 @@
* Create the list of all packages.
* @param root root of the xml document.
*/
- protected void createPackageList(Node root) throws TransformerException {
+ protected void createPackageList(Node root) throws SAXException {
transform(root, ALLPACKAGES + ".xsl", ALLPACKAGES + getExtension());
}
@@ -314,7 +308,7 @@
* Create the list of all classes.
* @param root root of the xml document.
*/
- protected void createClassList(Node root) throws TransformerException {
+ protected void createClassList(Node root) throws SAXException {
transform(root, ALLCLASSES + ".xsl", ALLCLASSES + getExtension());
}
@@ -322,7 +316,7 @@
* Create the summary used in the overview.
* @param root root of the xml document.
*/
- protected void createPackageOverview(Node root) throws
TransformerException {
+ protected void createPackageOverview(Node root) throws SAXException {
transform(root, OVERVIEW_PACKAGES + ".xsl", OVERVIEW_PACKAGES +
getExtension());
}
@@ -349,7 +343,7 @@
* create all resulting html pages for all testsuites.
* @param root should be 'testsuites' node.
*/
- protected void createAllTestSuiteDetails(Element root) throws
TransformerException {
+ protected void createAllTestSuiteDetails(Element root) throws
SAXException {
NodeList testsuites =
root.getElementsByTagName(XMLConstants.TESTSUITE);
final int size = testsuites.getLength();
for (int i = 0; i < size; i++){
@@ -362,7 +356,7 @@
* create the html resulting page of one testsuite.
* @param root should be 'testsuite' node.
*/
- protected void createTestSuiteDetails(Element testsuite) throws
TransformerException {
+ protected void createTestSuiteDetails(Element testsuite) throws
SAXException {
String packageName =
testsuite.getAttribute(XMLConstants.ATTR_PACKAGE);
String pkgPath = packageToPath(packageName);
@@ -382,7 +376,7 @@
* create the html resulting page of the summary of each package of the
root element.
* @param root should be 'testsuites' node.
*/
- protected void createAllPackageDetails(Element root) throws
TransformerException, ParserConfigurationException {
+ protected void createAllPackageDetails(Element root) throws
SAXException, ParserConfigurationException {
Enumeration packages = getPackages(root);
while ( packages.hasMoreElements() ){
String pkgname = (String)packages.nextElement();
@@ -409,7 +403,7 @@
* @param root should be 'testsuites' node.
* @param pkgname Name of the package that we want a summary.
*/
- protected void createPackageDetails(Node root, String pkgname) throws
TransformerException {
+ protected void createPackageDetails(Node root, String pkgname) throws
SAXException {
String path = packageToPath(pkgname);
// apply style to get the list of the classes of this package and
@@ -443,13 +437,13 @@
* @param xslfile style file
* @param outfilename filename of the result of the style applied on the
Node
*
- * @throws TransformerException SAX Parsing Error on the style Sheet.
+ * @throws SAXException SAX Parsing Error on the style Sheet.
*/
- protected void transform(Node root, String xslname, String htmlname)
throws TransformerException {
+ protected void transform(Node root, String xslname, String htmlname)
throws SAXException {
try{
final long t0 = System.currentTimeMillis();
- StreamSource xsl_source = getXSLStreamSource(xslname);
- Transformer transformer = tfactory.newTransformer(xsl_source);
+ XSLTInputSource xsl_source = getXSLStreamSource(xslname);
+ XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
File htmlfile = new File(toDir, htmlname);
// create the directory if it does not exist
File dir = new File(htmlfile.getParent()); // getParentFile is
in JDK1.2+
@@ -457,22 +451,23 @@
dir.mkdirs();
}
task.log("Applying '" + xslname + "'. Generating '" + htmlfile +
"'", Project.MSG_VERBOSE);
- transformer.transform( new DOMSource(root), new
StreamResult(htmlfile));
+ processor.process( new XSLTInputSource(root), xsl_source, new
XSLTResultTarget(htmlfile.getAbsolutePath()) );
final long dt = System.currentTimeMillis() - t0;
- task.log("Transform time: " + dt + "ms");
+ task.log("Transform time for " + xslname + ": " + dt + "ms");
} catch (IOException e){
task.log(e.getMessage(), Project.MSG_ERR);
e.printStackTrace(); //@todo bad, change this
- throw new TransformerException(e.getMessage());
+ throw new SAXException(e.getMessage());
}
}
+
/**
* default xsls are embedded in the distribution jar. As a default we
will use
* them, otherwise we will get the one supplied by the client in a given
* directory. It must have the same name.
*/
- protected StreamSource getXSLStreamSource(String name) throws
IOException {
+ protected XSLTInputSource getXSLStreamSource(String name) throws
IOException {
InputStream in;
String systemId; //we need this because there are references in xsls
if (styleDir == null){
@@ -483,7 +478,7 @@
in= new FileInputStream(f);
systemId = f.getAbsolutePath();
}
- StreamSource ss = new StreamSource(in);
+ XSLTInputSource ss = new XSLTInputSource(in);
ss.setSystemId(systemId);
return ss;
}
1.2 +8 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
Index: XMLResultAggregator.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLResultAggregator.java 2001/02/02 17:03:56 1.1
+++ XMLResultAggregator.java 2001/02/13 12:32:00 1.2
@@ -57,6 +57,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.io.StringWriter;
import java.io.FileOutputStream;
import java.util.Enumeration;
import java.util.Vector;
@@ -248,7 +249,10 @@
for (int i = 0; i < files.length; i++) {
try {
log("Parsing file: '" + files[i] + "'", Project.MSG_VERBOSE);
- Document testsuiteDoc = builder.parse( files[i] );
+ //XXX there seems to be a bug in xerces 1.3.0 that doesn't
like file object
+ // will investigate later. It does not use the given
directory but
+ // the vm dir instead ? Works fine with crimson.
+ Document testsuiteDoc = builder.parse( "file:///" +
files[i].getAbsolutePath() );
Element elem = testsuiteDoc.getDocumentElement();
// make sure that this is REALLY a testsuite.
if ( TESTSUITE.equals(elem.getNodeName()) ) {
@@ -261,6 +265,9 @@
// a testcase might have failed and write a zero-length
document,
// It has already failed, but hey.... mm. just put a warning
log("The file " + files[i] + " is not a valid XML document.
It is possibly corrupted.", Project.MSG_WARN);
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ log(sw.toString(), Project.MSG_DEBUG);
} catch (IOException e){
log("Error while accessing file " + files[i] + ": " +
e.getMessage(), Project.MSG_ERR);
}
1.10 +3 -1
jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
Index: CommandlineJava.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CommandlineJava.java 2001/01/19 13:27:00 1.9
+++ CommandlineJava.java 2001/02/13 12:32:00 1.10
@@ -239,7 +239,9 @@
c.vmCommand = (Commandline) vmCommand.clone();
c.javaCommand = (Commandline) javaCommand.clone();
c.sysProperties = (SysProperties) sysProperties.clone();
- c.classpath = (Path) classpath.clone();
+ if (classpath != null) {
+ c.classpath = (Path) classpath.clone();
+ }
c.vmVersion = vmVersion;
return c;
}
1.6 +7 -2
jakarta-ant/src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java
Index: CommandlineJavaTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CommandlineJavaTest.java 2001/01/08 16:40:44 1.5
+++ CommandlineJavaTest.java 2001/02/13 12:32:01 1.6
@@ -92,9 +92,14 @@
assertEquals("no classpath", "junit.textui.TestRunner", s[2]);
assertEquals("no classpath",
"org.apache.tools.ant.CommandlineJavaTest", s[3]);
+ try {
+ CommandlineJava c2 = (CommandlineJava) c.clone();
+ } catch (NullPointerException ex) {
+ fail("cloning should work without classpath specified");
+ }
-
c.createClasspath(project).setLocation(project.resolveFile("lib/core/junit.jar"));
-
c.createClasspath(project).setLocation(project.resolveFile("lib/ant.jar"));
+
c.createClasspath(project).setLocation(project.resolveFile("lib/optional/junit.jar"));
+
c.createClasspath(project).setLocation(project.resolveFile("bootstrap/lib/ant.jar"));
s = c.getCommandline();
assertEquals("with classpath", 6, s.length);
assertEquals("with classpath", "java", s[0]);