New upstream version 1.10.5
Emmanuel Bourg
5 years ago
0 | Changes from Ant 1.10.4 TO Ant 1.10.5 | |
1 | ===================================== | |
2 | ||
3 | Fixed bugs: | |
4 | ----------- | |
5 | ||
6 | * Fixes a regression in the "get" task where redirects | |
7 | from a HTTP resource to a HTTPS resource started throwing | |
8 | an exception. | |
9 | Bugzilla Report 62499 | |
10 | ||
11 | * the new allowFilesToEscapeDest didn't work when set to false and | |
12 | archive entries contained relative paths with so many ".." | |
13 | segnments that the resulting path would go beyond the file system | |
14 | root. | |
15 | Bugzilla Report 62502 | |
16 | ||
17 | Other changes: | |
18 | -------------- | |
19 | * Java task now accepts a "sourcefile" attribute to allow single file | |
20 | source program execution, a feature that is introduced in Java 11. | |
21 | ||
0 | 22 | Changes from Ant 1.10.3 TO Ant 1.10.4 |
1 | 23 | ===================================== |
2 | 24 |
32 | 32 | <property name="name" value="ant"/> |
33 | 33 | <!-- this is the directory corresponding to groupId of Ant in the Maven repository --> |
34 | 34 | <property name="groupid" value="org/apache/ant"/> |
35 | <property name="project.version" value="1.10.4"/> | |
35 | <property name="project.version" value="1.10.5"/> | |
36 | 36 | <!-- pom.version is used when doing a distribution and must match with what is checked in under src/etc/poms --> |
37 | <property name="pom.version" value="1.10.4"/> | |
38 | <property name="manifest-version" value="1.10.4"/> | |
37 | <property name="pom.version" value="1.10.5"/> | |
38 | <property name="manifest-version" value="1.10.5"/> | |
39 | 39 | <property name="bootstrap.jar" value="ant-bootstrap.jar"/> |
40 | 40 | |
41 | 41 | <property name="ant.package" value="org/apache/tools/ant"/> |
30 | 30 | # Versions of different libraries. Please keep in alphabetical order, except |
31 | 31 | # when a specific dependency forces them to be out-of-order |
32 | 32 | ivy.version=2.4.0 |
33 | ant-antunit.version=1.3 | |
33 | ant-antunit.version=1.4 | |
34 | 34 | antlr.version=2.7.7 |
35 | 35 | bcel.version=6.2 |
36 | 36 | bsf.version=2.4.0 |
49 | 49 | <tr id="classname"> |
50 | 50 | <td>classname</td> |
51 | 51 | <td>the Java class to execute.</td> |
52 | <td rowspan="3">Exactly one of the three</td> | |
52 | <td rowspan="4">Exactly one of the four</td> | |
53 | 53 | </tr> |
54 | 54 | <tr> |
55 | 55 | <td>jar</td> |
63 | 63 | <td class="left">The initial or main module to resolve (must have a <code>Main-Class</code> |
64 | 64 | entry in the manifest). <var>fork</var> must be set to <q>true</q> if this option is |
65 | 65 | selected. <em>since Ant 1.9.7</em></td> |
66 | </tr> | |
67 | <tr> | |
68 | <td>sourcefile</td> | |
69 | <td class="left">The location of a ".java" file or a file containing shebang with Java source code. | |
70 | Set this attribute to run Java single file source programs, a feature introduced in Java 11. | |
71 | <var>fork</var> must be set to <q>true</q> if this option is selected. | |
72 | <em>since Ant 1.10.5</em></td> | |
66 | 73 | </tr> |
67 | 74 | <tr> |
68 | 75 | <td>args</td> |
30 | 30 | |
31 | 31 | <h3>Description</h3> |
32 | 32 | <p>Sends SMTP mail with MIME |
33 | attachments. <a href="https://www.oracle.com/technetwork/java/index-138643.html" | |
33 | attachments. <a href="https://javaee.github.io/javamail/" | |
34 | 34 | target="_top">JavaMail</a> |
35 | and <a href="https://www.oracle.com/technetwork/java/javase/jaf-135115.html" target="_top">Java | |
36 | Activation Framework</a> are required for this task.</p> | |
35 | and <a href="https://github.com/javaee/activation" target="_top">Java | |
36 | Activation Framework</a> are required for this task. The Java | |
37 | Activation Framework is part of the standard class library for Java 6 | |
38 | to Java 10 but the <code>java.activation</code> module has been | |
39 | deprecated in Java 9 and must be enabled explicitly when running on | |
40 | Java 10. Alternatively it can be provided as an external library.</p> | |
37 | 41 | <p>Multiple files can be attached using <a href="../Types/fileset.html">FileSets.</a></p> |
38 | 42 | <h3>Parameters</h3> |
39 | 43 | <table class="attr"> |
18 | 18 | <head> |
19 | 19 | <meta http-equiv="Content-Language" content="en-us"> |
20 | 20 | <link rel="stylesheet" type="text/css" href="stylesheets/style.css"> |
21 | <title>Apache Ant 1.10.4 User Manual</title> | |
21 | <title>Apache Ant 1.10.5 User Manual</title> | |
22 | 22 | </head> |
23 | 23 | |
24 | 24 | <body> |
25 | 25 | <h1 class="center"><img src="images/ant_logo_large.gif" width="190" height="120" alt="Apache Ant logo"></h1> |
26 | <h1 class="center">Apache Ant™ 1.10.4 Manual</h1> | |
27 | <p>This is the manual for version 1.10.4 of <a href="https://ant.apache.org/" target="_top">Apache Ant</a>. If your | |
26 | <h1 class="center">Apache Ant™ 1.10.5 Manual</h1> | |
27 | <p>This is the manual for version 1.10.5 of <a href="https://ant.apache.org/" target="_top">Apache Ant</a>. If your | |
28 | 28 | version of Ant (as verified with <kbd>ant -version</kbd>) is older or newer than this version then this is not the |
29 | 29 | correct manual set. Please use the documentation appropriate to your current version. Also, if you are using a |
30 | 30 | version older than the most recent release, we recommend an upgrade to fix bugs as well as provide new |
18 | 18 | <head> |
19 | 19 | <meta http-equiv="Content-Language" content="en-us"> |
20 | 20 | <link rel="stylesheet" type="text/css" href="stylesheets/style.css"> |
21 | <title>Apache Ant User Manual—Credits</title> | |
21 | <title>Apache Ant User Manual - Credits</title> | |
22 | 22 | </head> |
23 | 23 | |
24 | 24 | <body> |
45 | 45 | <li>Arnout J. Kuiper (<a href="mailto:ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>)</li> |
46 | 46 | <li>Antoine Lévy-Lambert</li> |
47 | 47 | <li>Conor MacNeill</li> |
48 | <li>Jan Matérne</li> | |
48 | <li>Jan Matèrne</li> | |
49 | 49 | <li>Stefano Mazzocchi (<a href="mailto:stefano@apache.org">stefano@apache.org</a>)</li> |
50 | 50 | <li>Erik Meade (<a href="mailto:emeade@geekfarm.org">emeade@geekfarm.org</a>)</li> |
51 | 51 | <li>Sam Ruby (<a href="mailto:rubys@us.ibm.com">rubys@us.ibm.com</a>)</li> |
60 | 60 | <li>Craeg Strong (<a href="mailto:cstrong@arielpartners.com">cstrong@arielpartners.com</a>)</li> |
61 | 61 | </ul> |
62 | 62 | |
63 | <p class="center">Version: 1.10.4</p> | |
63 | <p class="center">Version: 1.10.5</p> | |
64 | 64 | |
65 | 65 | </body> |
66 | 66 | </html> |
896 | 896 | <td><a href="https://javaee.github.io/javamail/" target="_top">https://javaee.github.io/javamail/</a></td> |
897 | 897 | </tr> |
898 | 898 | <tr> |
899 | <td>activation.jar<br/>(included in Java 6 and later runtime)</td> | |
899 | <td>activation.jar<br/> | |
900 | (included in Java 6 to Java 10 but | |
901 | the <code>java.activation</code> module is deprecated and marked | |
902 | for removal in Java 9 and needs to be enabled explicitly on Java | |
903 | 10)</td> | |
900 | 904 | <td><a href="Tasks/mail.html">mail</a> task with MIME encoding, |
901 | 905 | and <em><u>deprecated</u></em> <a href="Tasks/mimemail.html">mimemail</a> task</td> |
902 | <td><a href="https://www.oracle.com/technetwork/java/javase/jaf-135115.html" | |
906 | <td><a href="https://github.com/javaee/activation" | |
903 | 907 | target="_top">https://www.oracle.com/technetwork/java/javase/jaf-135115.html</a></td> |
904 | 908 | </tr> |
905 | 909 | <tr> |
88 | 88 | </ul--> |
89 | 89 | |
90 | 90 | <h1><a name="top">JDepend Analysis</a></h1> |
91 | <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p> | |
91 | <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="https://ant.apache.org">Ant</a>.</p> | |
92 | 92 | <hr size="2" /> |
93 | 93 | |
94 | 94 | <table width="100%"><tr><td> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant Core</name> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant-launcher</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-antlr</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + ANTLR</name> |
37 | 37 | <description>antlr specific task. |
38 | 38 | The implementation forks a java process, therefore the antlr jar file is only needed at runtime</description> |
40 | 40 | <dependency> |
41 | 41 | <groupId>org.apache.ant</groupId> |
42 | 42 | <artifactId>ant</artifactId> |
43 | <version>1.10.4</version> | |
43 | <version>1.10.5</version> | |
44 | 44 | <optional>true</optional> |
45 | 45 | <scope>compile</scope> |
46 | 46 | </dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-apache-bcel</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + BCEL</name> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-apache-bsf</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + BSF</name> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-apache-log4j</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Log4J</name> |
36 | 36 | <dependencies> |
37 | 37 | <dependency> |
38 | 38 | <groupId>org.apache.ant</groupId> |
39 | 39 | <artifactId>ant</artifactId> |
40 | <version>1.10.4</version> | |
40 | <version>1.10.5</version> | |
41 | 41 | <scope>compile</scope> |
42 | 42 | </dependency> |
43 | 43 | <dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-apache-oro</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + Apache Oro</name> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-apache-regexp</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Apache Regexp</name> |
36 | 36 | <dependencies> |
37 | 37 | <dependency> |
38 | 38 | <groupId>org.apache.ant</groupId> |
39 | 39 | <artifactId>ant</artifactId> |
40 | <version>1.10.4</version> | |
40 | <version>1.10.5</version> | |
41 | 41 | <scope>compile</scope> |
42 | 42 | </dependency> |
43 | 43 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-apache-resolver</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Apache Resolver</name> |
36 | 36 | <dependencies> |
37 | 37 | <dependency> |
38 | 38 | <groupId>org.apache.ant</groupId> |
39 | 39 | <artifactId>ant</artifactId> |
40 | <version>1.10.4</version> | |
40 | <version>1.10.5</version> | |
41 | 41 | <scope>compile</scope> |
42 | 42 | </dependency> |
43 | 43 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-apache-xalan2</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Xalan 2</name> |
36 | 36 | <description>contains Xalan2-specific features</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-commons-logging</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Commons Logging</name> |
36 | 36 | <description>Ant Listener based on commons-logging</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-commons-net</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + Commons Net</name> |
36 | 36 | <description>ftp, rexec and telnet tasks</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-jai</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + JAI</name> |
37 | 37 | <description>image task and corresponding types. |
38 | 38 | </description> |
40 | 40 | <dependency> |
41 | 41 | <groupId>org.apache.ant</groupId> |
42 | 42 | <artifactId>ant</artifactId> |
43 | <version>1.10.4</version> | |
43 | <version>1.10.5</version> | |
44 | 44 | <scope>compile</scope> |
45 | 45 | </dependency> |
46 | 46 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-javamail</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JavaMail</name> |
36 | 36 | <description>implementation of the mail task based on javamail. |
37 | 37 | Required to send emails to SMTP servers using user/password combinations |
40 | 40 | <dependency> |
41 | 41 | <groupId>org.apache.ant</groupId> |
42 | 42 | <artifactId>ant</artifactId> |
43 | <version>1.10.4</version> | |
43 | <version>1.10.5</version> | |
44 | 44 | <scope>compile</scope> |
45 | 45 | </dependency> |
46 | 46 | <dependency> |
49 | 49 | <version>1.6.1</version> |
50 | 50 | <scope>compile</scope> |
51 | 51 | </dependency> |
52 | </dependencies> | |
52 | </dependencies> | |
53 | 53 | <build> |
54 | 54 | <plugins> |
55 | 55 | <plugin> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-jdepend</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + JDepend</name> |
37 | 37 | <description>task jdepend invoking the jdepend parser. There is also a version 2.9.1 of the |
38 | 38 | jdepend parser available on the maven repository</description> |
40 | 40 | <dependency> |
41 | 41 | <groupId>org.apache.ant</groupId> |
42 | 42 | <artifactId>ant</artifactId> |
43 | <version>1.10.4</version> | |
43 | <version>1.10.5</version> | |
44 | 44 | <scope>compile</scope> |
45 | 45 | </dependency> |
46 | 46 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-jmf</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JMF</name> |
36 | 36 | <description>contains the sound task and a soundplayer listener |
37 | 37 | download the dependency from http://java.sun.com/products/java-media/jmf/</description> |
39 | 39 | <dependency> |
40 | 40 | <groupId>org.apache.ant</groupId> |
41 | 41 | <artifactId>ant</artifactId> |
42 | <version>1.10.4</version> | |
42 | <version>1.10.5</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 | </dependencies> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-jsch</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JSch</name> |
36 | 36 | <description>contains the sshexec and scp tasks |
37 | 37 | </description> |
39 | 39 | <dependency> |
40 | 40 | <groupId>org.apache.ant</groupId> |
41 | 41 | <artifactId>ant</artifactId> |
42 | <version>1.10.4</version> | |
42 | <version>1.10.5</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-junit</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JUnit</name> |
36 | 36 | <description>contains the junit and junirreport tasks</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-junit4</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JUnit 4</name> |
36 | 36 | <description>contains JUnit 4.x support</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-junitlauncher</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + JUnit 5</name> |
36 | 36 | <description>contains JUnit 5.x support</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-launcher</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant Launcher</name> |
37 | 37 | <build> |
38 | 38 | <plugins> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-netrexx</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + NetRexx</name> |
36 | 36 | <description>NetRexxC task |
37 | 37 | dependency can be downloaded from http://www.ibm.com/software/awdtools/netrexx/download.html</description> |
39 | 39 | <dependency> |
40 | 40 | <groupId>org.apache.ant</groupId> |
41 | 41 | <artifactId>ant</artifactId> |
42 | <version>1.10.4</version> | |
42 | <version>1.10.5</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 | <!-- Processed too early, before maven-antrun-plugin gets a chance to work: |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-swing</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant + Swing</name> |
37 | 37 | <description>a listener and a splash task based on Swing</description> |
38 | 38 | <dependencies> |
39 | 39 | <dependency> |
40 | 40 | <groupId>org.apache.ant</groupId> |
41 | 41 | <artifactId>ant</artifactId> |
42 | <version>1.10.4</version> | |
42 | <version>1.10.5</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 | </dependencies> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | 28 | <relativePath>../pom.xml</relativePath> |
29 | <version>1.10.4</version> | |
29 | <version>1.10.5</version> | |
30 | 30 | </parent> |
31 | 31 | <modelVersion>4.0.0</modelVersion> |
32 | 32 | <url>http://ant.apache.org/</url> |
33 | 33 | <groupId>org.apache.ant</groupId> |
34 | 34 | <artifactId>ant-testutil</artifactId> |
35 | <version>1.10.4</version> | |
35 | <version>1.10.5</version> | |
36 | 36 | <name>Apache Ant Test Utilities</name> |
37 | 37 | <description>test utility classes</description> |
38 | 38 | <dependencies> |
39 | 39 | <dependency> |
40 | 40 | <groupId>org.apache.ant</groupId> |
41 | 41 | <artifactId>ant</artifactId> |
42 | <version>1.10.4</version> | |
42 | <version>1.10.5</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 | <dependency> |
25 | 25 | <groupId>org.apache.ant</groupId> |
26 | 26 | <artifactId>ant-parent</artifactId> |
27 | 27 | <relativePath>../pom.xml</relativePath> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | </parent> |
30 | 30 | <modelVersion>4.0.0</modelVersion> |
31 | 31 | <url>http://ant.apache.org/</url> |
32 | 32 | <groupId>org.apache.ant</groupId> |
33 | 33 | <artifactId>ant-xz</artifactId> |
34 | <version>1.10.4</version> | |
34 | <version>1.10.5</version> | |
35 | 35 | <name>Apache Ant + XZ for Java</name> |
36 | 36 | <description>contains the xz compression support</description> |
37 | 37 | <dependencies> |
38 | 38 | <dependency> |
39 | 39 | <groupId>org.apache.ant</groupId> |
40 | 40 | <artifactId>ant</artifactId> |
41 | <version>1.10.4</version> | |
41 | <version>1.10.5</version> | |
42 | 42 | <scope>compile</scope> |
43 | 43 | </dependency> |
44 | 44 | <dependency> |
25 | 25 | <modelVersion>4.0.0</modelVersion> |
26 | 26 | <groupId>org.apache.ant</groupId> |
27 | 27 | <artifactId>ant-parent</artifactId> |
28 | <version>1.10.4</version> | |
28 | <version>1.10.5</version> | |
29 | 29 | <packaging>pom</packaging> |
30 | 30 | <description>master POM</description> |
31 | 31 | <licenses> |
19 | 19 | <import file="../buildfiletest-base.xml"/> |
20 | 20 | |
21 | 21 | <target name="setUp"> |
22 | <mkdir dir="${output}"/> | |
22 | <mkdir dir="${output}" /> | |
23 | 23 | </target> |
24 | 24 | |
25 | 25 | <target name="testLineContains" depends="setUp"> |
34 | 34 | </filterchain> |
35 | 35 | </copy> |
36 | 36 | </target> |
37 | ||
37 | ||
38 | 38 | <target name="testNegateLineContains" depends="setUp"> |
39 | 39 | <copy file="input/linecontains.test" |
40 | 40 | tofile="${output}/negatelinecontains.test"> |
49 | 49 | <condition> |
50 | 50 | <not> |
51 | 51 | <filesmatch file1="${output}/negatelinecontains.test" |
52 | file2="expected/negatelinecontains.test"/> | |
52 | file2="expected/negatelinecontains.test" /> | |
53 | 53 | </not> |
54 | 54 | </condition> |
55 | 55 | </fail> |
56 | 56 | </target> |
57 | ||
57 | ||
58 | 58 | <target name="testEscapeUnicode" depends="setUp"> |
59 | 59 | <copy todir="${output}" encoding="UTF-8"> |
60 | 60 | <fileset dir="input"> |
71 | 71 | |
72 | 72 | <target name="testStripJavaComments" depends="setUp"> |
73 | 73 | <copy todir="${output}"> |
74 | <fileset dir="input" includes="stripjavacomments.test"/> | |
74 | <fileset dir="input" includes="stripjavacomments.test" /> | |
75 | 75 | <filterchain> |
76 | <filterreader classname="org.apache.tools.ant.filters.StripJavaComments"/> | |
76 | <filterreader classname="org.apache.tools.ant.filters.StripJavaComments" /> | |
77 | 77 | </filterchain> |
78 | 78 | </copy> |
79 | 79 | </target> |
95 | 95 | <filterchain> |
96 | 96 | <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens"> |
97 | 97 | <param type="propertiesfile" value="${basedir}/input/sample.properties"/> |
98 | </filterreader> | |
98 | </filterreader> | |
99 | 99 | </filterchain> |
100 | 100 | </copy> |
101 | 101 | </target> |
19 | 19 | <import file="../buildfiletest-base.xml"/> |
20 | 20 | |
21 | 21 | <target name="setUp"> |
22 | <mkdir dir="${output}"/> | |
22 | <mkdir dir="${output}" /> | |
23 | 23 | </target> |
24 | 24 | |
25 | 25 | <!-- Testcases for HeadFilter --> |
57 | 57 | </target> |
58 | 58 | |
59 | 59 | <target name="testFilterReaderHeadLinesSkip" depends="setUp"> |
60 | <copy file="input/head-tail.test" | |
60 | <copy file="input/head-tail.test" | |
61 | 61 | tofile="${output}/head-tail.filterReaderHeadLinesSkip.test"> |
62 | 62 | <filterchain> |
63 | 63 | <filterreader classname="org.apache.tools.ant.filters.HeadFilter"> |
111 | 111 | </target> |
112 | 112 | |
113 | 113 | <target name="testFilterReaderTailLinesSkip" depends="setUp"> |
114 | <copy file="input/head-tail.test" | |
114 | <copy file="input/head-tail.test" | |
115 | 115 | tofile="${output}/head-tail.filterReaderTailLinesSkip.test"> |
116 | 116 | <filterchain> |
117 | 117 | <filterreader classname="org.apache.tools.ant.filters.TailFilter"> |
31 | 31 | <fail> |
32 | 32 | <condition> |
33 | 33 | <not> |
34 | <antversion exactly="1.10.4" /> | |
34 | <antversion exactly="1.10.5" /> | |
35 | 35 | </not> |
36 | 36 | </condition> |
37 | Should be exactly 1.10.4 | |
37 | Should be exactly 1.10.5 | |
38 | 38 | </fail> |
39 | 39 | </target> |
40 | 40 |
18 | 18 | <project name="delete-test" basedir="." default="test1"> |
19 | 19 | |
20 | 20 | <import file="../buildfiletest-base.xml"/> |
21 | ||
22 | 21 | |
23 | 22 | <property name="dir" location="${output}" /> |
24 | 23 | <basename property="dirname" file="${output}"/> |
423 | 423 | |
424 | 424 | <target name="foo" /> |
425 | 425 | |
426 | <target name="simpleSourceFile" | |
427 | description="Tests that the single source file programs, introduced in Java 11, works as expected"> | |
428 | <mkdir dir="${output}/javasource"/> | |
429 | <echo file="/tmp/foo.txt" message="${output}"/> | |
430 | <echo file="${output}/javasource/A.java"> | |
431 | import java.nio.file.Files; | |
432 | import java.nio.file.Paths; | |
433 | import java.io.BufferedWriter; | |
434 | public class A { | |
435 | public static void main(String[] args) throws Exception { | |
436 | final String outFile = args[0]; | |
437 | try(BufferedWriter bw = Files.newBufferedWriter(Paths.get(outFile));) { | |
438 | bw.write("Hello world!"); | |
439 | } | |
440 | } | |
441 | } | |
442 | </echo> | |
443 | <java sourcefile="${output}/javasource/A.java" fork="true" failonerror="true" logerror="true"> | |
444 | <arg value="${output}/javasource/simpleSourceFileOutput.txt"/> | |
445 | </java> | |
446 | <loadfile property="simpleSourceFile.prog.output" srcfile="${output}/javasource/simpleSourceFileOutput.txt"/> | |
447 | <condition property="simpleSourceFile.execution.success"> | |
448 | <equals arg1="${simpleSourceFile.prog.output}" arg2="Hello world!"/> | |
449 | </condition> | |
450 | <fail unless="simpleSourceFile.execution.success">Java source-file execution did not yield the expected | |
451 | result</fail> | |
452 | </target> | |
453 | ||
454 | ||
455 | <target name="generateDummyJavaSource"> | |
456 | <mkdir dir="${output}/javasource"/> | |
457 | <echo file="/tmp/foo.txt" message="${output}"/> | |
458 | <echo file="${output}/javasource/ThrowsException.java"> | |
459 | public class ThrowsException { | |
460 | public static void main(String[] args) throws Exception { | |
461 | throw new RuntimeException("Wasn't expected to be run"); | |
462 | } | |
463 | } | |
464 | </echo> | |
465 | </target> | |
466 | ||
467 | <target name="sourceFileRequiresFork" depends="generateDummyJavaSource"> | |
468 | <java sourcefile="${output}/javasource/ThrowsException.java" failonerror="true" logerror="true"/> | |
469 | <fail>Execution of java task, for sourcefile, was expected to fail since fork wasn't set</fail> | |
470 | </target> | |
471 | ||
472 | <target name="sourceFileCantUseClassname" depends="generateDummyJavaSource"> | |
473 | <java classname="foo.bar" sourcefile="${output}/javasource/ThrowsException.java" | |
474 | fork="true" failonerror="true" logerror="true"/> | |
475 | <fail>Execution of java task, for sourcefile, was expected to fail since classname attribute was set</fail> | |
476 | </target> | |
477 | ||
478 | <target name="sourceFileCantUseJar" depends="generateDummyJavaSource"> | |
479 | <java jar="irrelevant.jar" sourcefile="${output}/javasource/ThrowsException.java" | |
480 | fork="true" failonerror="true" logerror="true"/> | |
481 | <fail>Execution of java task, for sourcefile, was expected to fail since jar attribute was set</fail> | |
482 | </target> | |
483 | ||
484 | <target name="sourceFileCantUseModule" depends="generateDummyJavaSource"> | |
485 | <java module="irrelevant" sourcefile="${output}/javasource/ThrowsException.java" | |
486 | fork="true" failonerror="true" logerror="true"/> | |
487 | <fail>Execution of java task, for sourcefile, was expected to fail since module attribute was set</fail> | |
488 | </target> | |
489 | ||
426 | 490 | </project> |
36 | 36 | </target> |
37 | 37 | |
38 | 38 | <target name="test5" description="Get the latest from PVCS"> |
39 | <pvcs pvcsbin="/home/cvs/pvcsant/src/etc/testcases/taskdefs" | |
39 | <pvcs pvcsbin="/home/cvs/pvcsant/src/etc/testcases/taskdefs" | |
40 | 40 | repository="//ct4serv2/pvcs/monitor"/> |
41 | 41 | </target> |
42 | 42 |
331 | 331 | mappedNames = new String[] {entryName}; |
332 | 332 | } |
333 | 333 | File f = fileUtils.resolveFile(dir, mappedNames[0]); |
334 | if (!allowedOutsideOfDest && !fileUtils.isLeadingPath(dir, f)) { | |
335 | log("skipping " + entryName + " as its target " + f + " is outside of " | |
336 | + dir + ".", Project.MSG_VERBOSE); | |
334 | if (!allowedOutsideOfDest && !fileUtils.isLeadingPath(dir, f, true)) { | |
335 | log("skipping " + entryName + " as its target " + f.getCanonicalPath() | |
336 | + " is outside of " + dir.getCanonicalPath() + ".", Project.MSG_VERBOSE); | |
337 | 337 | return; |
338 | 338 | } |
339 | 339 |
692 | 692 | |
693 | 693 | |
694 | 694 | private boolean redirectionAllowed(final URL aSource, final URL aDest) { |
695 | if (aSource.getProtocol().equals(aDest.getProtocol()) | |
696 | && (HTTP.equals(aSource.getProtocol()) || HTTPS.equals(aDest.getProtocol()))) { | |
697 | redirections++; | |
698 | if (redirections > REDIRECT_LIMIT) { | |
699 | final String message = "More than " + REDIRECT_LIMIT | |
700 | + " times redirected, giving up"; | |
701 | if (ignoreErrors) { | |
702 | log(message, logLevel); | |
703 | return false; | |
704 | } | |
695 | if (!(aSource.getProtocol().equals(aDest.getProtocol()) || (HTTP | |
696 | .equals(aSource.getProtocol()) && HTTPS.equals(aDest | |
697 | .getProtocol())))) { | |
698 | final String message = "Redirection detected from " | |
699 | + aSource.getProtocol() + " to " + aDest.getProtocol() | |
700 | + ". Protocol switch unsafe, not allowed."; | |
701 | if (ignoreErrors) { | |
702 | log(message, logLevel); | |
703 | return false; | |
704 | } else { | |
705 | 705 | throw new BuildException(message); |
706 | 706 | } |
707 | return true; | |
708 | } | |
709 | ||
710 | final String message = "Redirection detected from " | |
711 | + aSource.getProtocol() + " to " + aDest.getProtocol() | |
712 | + ". Protocol switch unsafe, not allowed."; | |
713 | if (ignoreErrors) { | |
714 | log(message, logLevel); | |
715 | return false; | |
716 | } | |
717 | throw new BuildException(message); | |
707 | } | |
708 | ||
709 | redirections++; | |
710 | if (redirections > REDIRECT_LIMIT) { | |
711 | final String message = "More than " + REDIRECT_LIMIT | |
712 | + " times redirected, giving up"; | |
713 | if (ignoreErrors) { | |
714 | log(message, logLevel); | |
715 | return false; | |
716 | } else { | |
717 | throw new BuildException(message); | |
718 | } | |
719 | } | |
720 | ||
721 | ||
722 | return true; | |
718 | 723 | } |
719 | 724 | |
720 | 725 | private URLConnection openConnection(final URL aSource) throws IOException { |
141 | 141 | protected void checkConfiguration() throws BuildException { |
142 | 142 | String classname = getCommandLine().getClassname(); |
143 | 143 | String module = getCommandLine().getModule(); |
144 | if (classname == null && getCommandLine().getJar() == null && module == null) { | |
144 | final String sourceFile = getCommandLine().getSourceFile(); | |
145 | if (classname == null && getCommandLine().getJar() == null && module == null && sourceFile == null) { | |
145 | 146 | throw new BuildException("Classname must not be null."); |
146 | 147 | } |
147 | 148 | if (!fork && getCommandLine().getJar() != null) { |
151 | 152 | if (!fork && getCommandLine().getModule() != null) { |
152 | 153 | throw new BuildException( |
153 | 154 | "Cannot execute a module in non-forked mode. Please set fork='true'. "); |
155 | } | |
156 | if (!fork && sourceFile != null) { | |
157 | throw new BuildException("Cannot execute sourcefile in non-forked mode. Please set fork='true'"); | |
154 | 158 | } |
155 | 159 | if (spawn && !fork) { |
156 | 160 | throw new BuildException( |
354 | 358 | * |
355 | 359 | * @param jarfile the jarfile to execute. |
356 | 360 | * |
357 | * @throws BuildException if there is also a main class specified. | |
361 | * @throws BuildException if there is also a {@code classname}, {@code module} | |
362 | * or {@code sourcefile} attribute specified | |
358 | 363 | */ |
359 | 364 | public void setJar(File jarfile) throws BuildException { |
360 | if (getCommandLine().getClassname() != null || getCommandLine().getModule() != null) { | |
365 | if (getCommandLine().getClassname() != null || getCommandLine().getModule() != null | |
366 | || getCommandLine().getSourceFile() != null) { | |
361 | 367 | throw new BuildException( |
362 | "Cannot use 'jar' with 'classname' or 'module' attributes in same command."); | |
368 | "Cannot use combination of 'jar', 'sourcefile', 'classname', 'module' attributes in same command"); | |
363 | 369 | } |
364 | 370 | getCommandLine().setJar(jarfile.getAbsolutePath()); |
365 | 371 | } |
369 | 375 | * |
370 | 376 | * @param s the name of the main class. |
371 | 377 | * |
372 | * @throws BuildException if the jar attribute has been set. | |
378 | * @throws BuildException if there is also a {@code jar} or {@code sourcefile} attribute specified | |
373 | 379 | */ |
374 | 380 | public void setClassname(String s) throws BuildException { |
375 | if (getCommandLine().getJar() != null) { | |
381 | if (getCommandLine().getJar() != null || getCommandLine().getSourceFile() != null) { | |
376 | 382 | throw new BuildException( |
377 | "Cannot use 'jar' and 'classname' attributes in same command"); | |
383 | "Cannot use combination of 'jar', 'classname', sourcefile attributes in same command"); | |
378 | 384 | } |
379 | 385 | getCommandLine().setClassname(s); |
380 | 386 | } |
384 | 390 | * |
385 | 391 | * @param module the name of the module. |
386 | 392 | * |
387 | * @throws BuildException if the jar attribute has been set. | |
393 | * @throws BuildException if there is also a {@code jar} or {@code sourcefile} attribute specified | |
388 | 394 | * @since 1.9.7 |
389 | 395 | */ |
390 | 396 | public void setModule(String module) throws BuildException { |
391 | if (getCommandLine().getJar() != null) { | |
397 | if (getCommandLine().getJar() != null || getCommandLine().getSourceFile() != null) { | |
392 | 398 | throw new BuildException( |
393 | "Cannot use 'jar' and 'module' attributes in same command"); | |
399 | "Cannot use combination of 'jar', 'module', sourcefile attributes in same command"); | |
394 | 400 | } |
395 | 401 | getCommandLine().setModule(module); |
402 | } | |
403 | ||
404 | /** | |
405 | * Set the Java source-file to execute. Support for single file source program | |
406 | * execution, in Java, is only available since Java 11. | |
407 | * | |
408 | * @param sourceFile The path to the source file | |
409 | * @throws BuildException if there is also a {@code jar}, {@code classname} | |
410 | * or {@code module} attribute specified | |
411 | * @since Ant 1.10.5 | |
412 | */ | |
413 | public void setSourceFile(final String sourceFile) throws BuildException { | |
414 | final String jar = getCommandLine().getJar(); | |
415 | final String className = getCommandLine().getClassname(); | |
416 | final String module = getCommandLine().getModule(); | |
417 | if (jar != null || className != null || module != null) { | |
418 | throw new BuildException("Cannot use 'sourcefile' in combination with 'jar' or " + | |
419 | "'module' or 'classname'"); | |
420 | } | |
421 | getCommandLine().setSourceFile(sourceFile); | |
396 | 422 | } |
397 | 423 | |
398 | 424 | /** |
842 | 868 | } |
843 | 869 | |
844 | 870 | /** |
845 | * Executes the given classname with the given arguments in a separate VM. | |
871 | * Executes the given source-file or classname with the given arguments in a separate VM. | |
846 | 872 | * @param command String[] of command-line arguments. |
847 | 873 | */ |
848 | 874 | private int fork(String[] command) throws BuildException { |
1017 | 1043 | public CommandlineJava.SysProperties getSysProperties() { |
1018 | 1044 | return getCommandLine().getSystemProperties(); |
1019 | 1045 | } |
1046 | ||
1047 | ||
1020 | 1048 | } |
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
371 | * Set the source-file, to execute as single file source programs, a feature, available | |
372 | * since Java 11. | |
373 | * | |
374 | * @param sourceFile The path to the source file | |
375 | * @since Ant 1.10.5 | |
376 | */ | |
377 | public void setSourceFile(final String sourceFile) { | |
378 | this.executableType = ExecutableType.SOURCE_FILE; | |
379 | javaCommand.setExecutable(sourceFile); | |
380 | } | |
381 | ||
382 | /** | |
383 | * @return Returns the source-file to execute, if this command line has | |
384 | * been {@link #setSourceFile(String) configured for single file source program | |
385 | * execution}. Else returns null. | |
386 | * @since Ant 1.10.5 | |
387 | */ | |
388 | public String getSourceFile() { | |
389 | return this.executableType == ExecutableType.SOURCE_FILE ? this.javaCommand.getExecutable() : null; | |
390 | } | |
391 | ||
392 | /** | |
371 | 393 | * Set the module to execute. |
372 | 394 | * @param module the module name. |
373 | 395 | * @since 1.9.7 |
533 | 555 | } else if (executableType == ExecutableType.MODULE) { |
534 | 556 | listIterator.add("-m"); |
535 | 557 | } |
536 | // this is the classname to run as well as its arguments. | |
558 | // this is the classname/source-file to run as well as its arguments. | |
537 | 559 | // in case of ExecutableType.JAR, the executable is a jar file, |
538 | 560 | // in case of ExecutableType.MODULE, the executable is a module name, potentially including a class name. |
561 | // in case of ExecutableType.SOURCE_FILE, the executable is a Java source file (ending in .java) or a shebang | |
562 | // file containing Java source | |
539 | 563 | javaCommand.addCommandToList(listIterator); |
540 | 564 | } |
541 | 565 | |
886 | 910 | /** |
887 | 911 | * Module execution. |
888 | 912 | */ |
889 | MODULE | |
913 | MODULE, | |
914 | ||
915 | /** | |
916 | * Source file (introduced in Java 11) | |
917 | */ | |
918 | SOURCE_FILE, | |
890 | 919 | } |
891 | 920 | } |
728 | 728 | * <li>DOS style paths that start with a drive letter will have |
729 | 729 | * \ as the separator.</li> |
730 | 730 | * </ul> |
731 | * Unlike {@link File#getCanonicalPath()} this method | |
732 | * specifically does not resolve symbolic links. | |
731 | * <p>Unlike {@link File#getCanonicalPath()} this method | |
732 | * specifically does not resolve symbolic links.</p> | |
733 | * | |
734 | * <p>If the path tries to go beyond the file system root (i.e. it | |
735 | * contains more ".." segments than can be travelled up) the | |
736 | * method will return the original path unchanged.</p> | |
733 | 737 | * |
734 | 738 | * @param path the path to be normalized. |
735 | 739 | * @return the normalized version of the path. |
1154 | 1158 | /** |
1155 | 1159 | * Removes a leading path from a second path. |
1156 | 1160 | * |
1161 | * <p>This method uses {@link #normalize} under the covers and | |
1162 | * does not resolve symbolic links.</p> | |
1163 | * | |
1157 | 1164 | * @param leading The leading path, must not be null, must be absolute. |
1158 | 1165 | * @param path The path to remove from, must not be null, must be absolute. |
1159 | 1166 | * |
1178 | 1185 | |
1179 | 1186 | /** |
1180 | 1187 | * Learn whether one path "leads" another. |
1188 | * | |
1189 | * <p>This method uses {@link #normalize} under the covers and | |
1190 | * does not resolve symbolic links.</p> | |
1191 | * | |
1192 | * <p>If either path tries to go beyond the file system root | |
1193 | * (i.e. it contains more ".." segments than can be travelled up) | |
1194 | * the method will return false.</p> | |
1195 | * | |
1181 | 1196 | * @param leading The leading path, must not be null, must be absolute. |
1182 | * @param path The path to remove from, must not be null, must be absolute. | |
1197 | * @param path The path to check, must not be null, must be absolute. | |
1183 | 1198 | * @return true if path starts with leading; false otherwise. |
1184 | 1199 | * @since Ant 1.7 |
1185 | 1200 | */ |
1194 | 1209 | if (!l.endsWith(File.separator)) { |
1195 | 1210 | l += File.separator; |
1196 | 1211 | } |
1212 | // ensure "/foo/" is not considered a parent of "/foo/../../bar" | |
1213 | String up = File.separator + ".." + File.separator; | |
1214 | if (l.contains(up) || p.contains(up) || (p + File.separator).contains(up)) { | |
1215 | return false; | |
1216 | } | |
1197 | 1217 | return p.startsWith(l); |
1218 | } | |
1219 | ||
1220 | /** | |
1221 | * Learn whether one path "leads" another. | |
1222 | * | |
1223 | * @param leading The leading path, must not be null, must be absolute. | |
1224 | * @param path The path to check, must not be null, must be absolute. | |
1225 | * @param resolveSymlinks whether symbolic links shall be resolved | |
1226 | * prior to comparing the paths. | |
1227 | * @return true if path starts with leading; false otherwise. | |
1228 | * @since Ant 1.10.5 | |
1229 | * @throws IOException if resolveSymlinks is true and invoking | |
1230 | * getCanonicaPath on either argument throws an exception | |
1231 | */ | |
1232 | public boolean isLeadingPath(File leading, File path, boolean resolveSymlinks) | |
1233 | throws IOException { | |
1234 | if (!resolveSymlinks) { | |
1235 | return isLeadingPath(leading, path); | |
1236 | } | |
1237 | final File l = leading.getCanonicalFile(); | |
1238 | File p = path.getCanonicalFile(); | |
1239 | do { | |
1240 | if (l.equals(p)) { | |
1241 | return true; | |
1242 | } | |
1243 | p = p.getParentFile(); | |
1244 | } while (p != null); | |
1245 | return false; | |
1198 | 1246 | } |
1199 | 1247 | |
1200 | 1248 | /** |
19 | 19 | <import file="../antunit-base.xml" /> |
20 | 20 | |
21 | 21 | <property name="location" value="http://ant.apache.org/webtest/gettest" /> |
22 | ||
22 | ||
23 | 23 | <target name="setUp"> |
24 | 24 | <mkdir dir="${output}" /> |
25 | 25 | </target> |
94 | 94 | |
95 | 95 | |
96 | 96 | <target name="testInfiniteRedirect" unless="jenkins"> |
97 | <au:expectfailure expectedmessage="More than 25 times redirected, giving up"> | |
97 | <au:expectfailure expectedmessage="More than 25 times redirected, giving up"> | |
98 | 98 | <get src="${location}/infinite.txt" dest="${output}/infinite.tmp"/> |
99 | 99 | </au:expectfailure> |
100 | 100 | </target> |
121 | 121 | </au:assertTrue> |
122 | 122 | <au:assertLogContains text="local.cgi moved to http" /> |
123 | 123 | </target> |
124 | ||
125 | <target name="testHttpToHttpsRedirect" description="Tests that a resource that's redirected | |
126 | from HTTP to HTTPS works without an error. See bugzilla-62499 for details"> | |
127 | <get src="${location}/http-to-https.txt" dest="${output}/http-to-https-redirect.tmp"/> | |
128 | <au:assertFileExists file="${output}/http-to-https-redirect.tmp"/> | |
129 | <au:assertTrue> | |
130 | <resourcecontains resource="${output}/http-to-https-redirect.tmp" substring="hello world"/> | |
131 | </au:assertTrue> | |
132 | </target> | |
124 | 133 | </project> |
22 | 22 | import java.util.stream.Collectors; |
23 | 23 | |
24 | 24 | import org.apache.tools.ant.util.JavaEnvUtils; |
25 | import org.junit.AssumptionViolatedException; | |
25 | 26 | import org.junit.Before; |
26 | 27 | import org.junit.Test; |
27 | import org.junit.internal.AssumptionViolatedException; | |
28 | 28 | |
29 | 29 | import static org.junit.Assert.assertEquals; |
30 | 30 | import static org.junit.Assert.assertFalse; |
31 | 31 | import org.apache.tools.ant.BuildException; |
32 | 32 | import org.apache.tools.ant.BuildFileRule; |
33 | 33 | import org.apache.tools.ant.input.DefaultInputHandler; |
34 | import org.apache.tools.ant.taskdefs.condition.JavaVersion; | |
34 | 35 | import org.apache.tools.ant.util.FileUtils; |
35 | 36 | import org.apache.tools.ant.util.TeeOutputStream; |
37 | import org.junit.Assume; | |
38 | import org.junit.AssumptionViolatedException; | |
36 | 39 | import org.junit.Before; |
37 | 40 | import org.junit.Rule; |
38 | 41 | import org.junit.Test; |
39 | import org.junit.internal.AssumptionViolatedException; | |
40 | 42 | import org.junit.rules.ExpectedException; |
41 | 43 | |
42 | 44 | import static org.hamcrest.Matchers.containsString; |
105 | 107 | @Test |
106 | 108 | public void testJarAndClassName() { |
107 | 109 | thrown.expect(BuildException.class); |
108 | thrown.expectMessage("Cannot use 'jar' and 'classname' attributes in same command"); | |
110 | thrown.expectMessage("Cannot use combination of "); | |
109 | 111 | buildRule.executeTarget("testJarAndClassName"); |
110 | 112 | } |
111 | 113 | |
112 | 114 | @Test |
113 | 115 | public void testClassnameAndJar() { |
114 | 116 | thrown.expect(BuildException.class); |
115 | thrown.expectMessage("Cannot use 'jar' with 'classname' or 'module' attributes in same command."); | |
117 | thrown.expectMessage("Cannot use combination of "); | |
116 | 118 | buildRule.executeTarget("testClassnameAndJar"); |
117 | 119 | } |
118 | 120 | |
119 | 121 | @Test |
120 | 122 | public void testJarAndModule() { |
121 | 123 | thrown.expect(BuildException.class); |
122 | thrown.expectMessage("Cannot use 'jar' and 'module' attributes in same command"); | |
124 | thrown.expectMessage("Cannot use combination of "); | |
123 | 125 | buildRule.executeTarget("testJarAndModule"); |
124 | 126 | } |
125 | 127 | |
126 | 128 | @Test |
127 | 129 | public void testModuleAndJar() { |
128 | 130 | thrown.expect(BuildException.class); |
129 | thrown.expectMessage("Cannot use 'jar' with 'classname' or 'module' attributes in same command."); | |
131 | thrown.expectMessage("Cannot use combination of "); | |
130 | 132 | buildRule.executeTarget("testModuleAndJar"); |
131 | 133 | } |
132 | 134 | |
410 | 412 | } |
411 | 413 | |
412 | 414 | /** |
415 | * Test that the Java single file source program feature introduced in Java 11 works fine | |
416 | * | |
417 | * @throws Exception | |
418 | */ | |
419 | @Test | |
420 | public void testSimpleSourceFile() throws Exception { | |
421 | requireJava11(); | |
422 | buildRule.executeTarget("simpleSourceFile"); | |
423 | } | |
424 | ||
425 | /** | |
426 | * Test that the sourcefile option of the Java task can only be run when fork attribute is set | |
427 | * | |
428 | * @throws Exception | |
429 | */ | |
430 | @Test | |
431 | public void testSourceFileRequiresFork() throws Exception { | |
432 | requireJava11(); | |
433 | thrown.expect(BuildException.class); | |
434 | thrown.expectMessage("Cannot execute sourcefile in non-forked mode. Please set fork='true'"); | |
435 | buildRule.executeTarget("sourceFileRequiresFork"); | |
436 | } | |
437 | ||
438 | /** | |
439 | * Tests that the sourcefile attribute and the classname attribute of the Java task cannot be used | |
440 | * together | |
441 | * | |
442 | * @throws Exception | |
443 | */ | |
444 | @Test | |
445 | public void testSourceFileCantUseClassname() throws Exception { | |
446 | requireJava11(); | |
447 | thrown.expect(BuildException.class); | |
448 | thrown.expectMessage("Cannot use 'sourcefile' in combination with"); | |
449 | buildRule.executeTarget("sourceFileCantUseClassname"); | |
450 | } | |
451 | ||
452 | /** | |
453 | * Tests that the sourcefile attribute and the jar attribute of the Java task cannot be used | |
454 | * together | |
455 | * | |
456 | * @throws Exception | |
457 | */ | |
458 | @Test | |
459 | public void testSourceFileCantUseJar() throws Exception { | |
460 | requireJava11(); | |
461 | thrown.expect(BuildException.class); | |
462 | thrown.expectMessage("Cannot use 'sourcefile' in combination with"); | |
463 | buildRule.executeTarget("sourceFileCantUseJar"); | |
464 | } | |
465 | ||
466 | /** | |
467 | * Tests that the sourcefile attribute and the module attribute of the Java task cannot be used | |
468 | * together | |
469 | * | |
470 | * @throws Exception | |
471 | */ | |
472 | @Test | |
473 | public void testSourceFileCantUseModule() throws Exception { | |
474 | requireJava11(); | |
475 | thrown.expect(BuildException.class); | |
476 | thrown.expectMessage("Cannot use 'sourcefile' in combination with"); | |
477 | buildRule.executeTarget("sourceFileCantUseModule"); | |
478 | } | |
479 | ||
480 | private static void requireJava11() { | |
481 | final JavaVersion javaVersion = new JavaVersion(); | |
482 | javaVersion.setAtLeast("11"); | |
483 | Assume.assumeTrue("Skipping test which requires a minimum of Java 11 runtime", javaVersion.eval()); | |
484 | } | |
485 | ||
486 | /** | |
413 | 487 | * entry point class with no dependencies other |
414 | 488 | * than normal JRE runtime |
415 | 489 | */ |
17 | 17 | |
18 | 18 | package org.apache.tools.ant.taskdefs; |
19 | 19 | |
20 | import org.junit.internal.AssumptionViolatedException; | |
20 | import org.junit.AssumptionViolatedException; | |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Interactive Testcase for Processdestroyer. |
600 | 600 | } |
601 | 601 | |
602 | 602 | } |
603 | ||
604 | @Test | |
603 | 605 | public void testGetDefaultEncoding() { |
604 | 606 | // This just tests that the function does not blow up |
605 | 607 | FILE_UTILS.getDefaultEncoding(); |
608 | } | |
609 | ||
610 | /** | |
611 | * @see "https://bz.apache.org/bugzilla/show_bug.cgi?id=62502" | |
612 | */ | |
613 | @Test | |
614 | public void isLeadingPathCannotBeFooledByTooManyDoubleDots() { | |
615 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/../../bar"))); | |
616 | assertFalse(FILE_UTILS.isLeadingPath(new File("c:\\foo"), new File("c:\\foo\\..\\..\\bar"))); | |
617 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/../.."))); | |
618 | } | |
619 | ||
620 | /** | |
621 | * @see "https://bz.apache.org/bugzilla/show_bug.cgi?id=62502" | |
622 | */ | |
623 | @Test | |
624 | public void isLeadingPathCanonicalVersionCannotBeFooledByTooManyDoubleDots() throws IOException { | |
625 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/../../bar"), true)); | |
626 | assertFalse(FILE_UTILS.isLeadingPath(new File("c:\\foo"), new File("c:\\foo\\..\\..\\bar"), true)); | |
627 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/../.."), true)); | |
628 | } | |
629 | ||
630 | @Test | |
631 | public void isLeadingPathCanonicalVersionWorksAsExpectedOnUnix() throws IOException { | |
632 | assumeFalse("Test doesn't run on DOS", Os.isFamily("dos")); | |
633 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/bar"), true)); | |
634 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/baz/../bar"), true)); | |
635 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/../foo/bar"), true)); | |
636 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foobar"), true)); | |
637 | assertFalse(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/bar"), true)); | |
638 | } | |
639 | ||
640 | @Test | |
641 | public void isLeadingPathAndTrailingSlashesOnUnix() throws IOException { | |
642 | assumeFalse("Test doesn't run on DOS", Os.isFamily("dos")); | |
643 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/bar"), true)); | |
644 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/bar/"), true)); | |
645 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/"), true)); | |
646 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo"), true)); | |
647 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/"), true)); | |
648 | ||
649 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/bar"), false)); | |
650 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/bar/"), false)); | |
651 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo/"), false)); | |
652 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo/"), new File("/foo"), false)); | |
653 | assertTrue(FILE_UTILS.isLeadingPath(new File("/foo"), new File("/foo/"), false)); | |
654 | } | |
655 | ||
656 | @Test | |
657 | public void isLeadingPathCanonicalVersionWorksAsExpectedOnDos() throws IOException { | |
658 | assumeTrue("Test only runs on DOS", Os.isFamily("dos")); | |
659 | assertTrue(FILE_UTILS.isLeadingPath(new File("C:\\foo"), new File("C:\\foo\\bar"), true)); | |
660 | assertTrue(FILE_UTILS.isLeadingPath(new File("C:\\foo"), new File("C:\\foo\\baz\\..\\bar"), true)); | |
661 | assertTrue(FILE_UTILS.isLeadingPath(new File("C:\\foo"), new File("C:\\foo\\..\\foo\\bar"), true)); | |
662 | assertFalse(FILE_UTILS.isLeadingPath(new File("C:\\foo"), new File("C:\\foobar"), true)); | |
663 | assertFalse(FILE_UTILS.isLeadingPath(new File("C:\\foo"), new File("C:\\bar"), true)); | |
664 | } | |
665 | ||
666 | @Test | |
667 | public void isLeadingPathAndTrailingSlashesOnDos() throws IOException { | |
668 | assumeTrue("Test only runs on DOS", Os.isFamily("dos")); | |
669 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\bar"), true)); | |
670 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\bar\\"), true)); | |
671 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\"), true)); | |
672 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo"), true)); | |
673 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo"), new File("c:\\foo\\"), true)); | |
674 | ||
675 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\bar"), false)); | |
676 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\bar\\"), false)); | |
677 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo\\"), false)); | |
678 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo\\"), new File("c:\\foo"), false)); | |
679 | assertTrue(FILE_UTILS.isLeadingPath(new File("c:\\foo"), new File("c:\\foo\\"), false)); | |
606 | 680 | } |
607 | 681 | |
608 | 682 | /** |
33 | 33 | import java.util.Vector; |
34 | 34 | |
35 | 35 | import org.apache.tools.ant.BuildException; |
36 | import org.junit.AssumptionViolatedException; | |
36 | 37 | import org.junit.Before; |
37 | 38 | import org.junit.Test; |
38 | import org.junit.internal.AssumptionViolatedException; | |
39 | 39 | |
40 | 40 | /** |
41 | 41 | * JUnit testcases for org.apache.tools.mail.MailMessage. |