bodewig 2002/10/04 04:04:50
Modified: . Tag: ANT_15_BRANCH build.xml
docs Tag: ANT_15_BRANCH index.html
src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
Javac.java
src/main/org/apache/tools/ant/util/facade Tag: ANT_15_BRANCH
FacadeTaskHelper.java
src/testcases/org/apache/tools/ant/util/facade Tag:
ANT_15_BRANCH FacadeTaskHelperTest.java
xdocs Tag: ANT_15_BRANCH index.xml
Log:
merge fixes for PR 13246 from HEAD.
Revision Changes Path
No revision
No revision
1.304.2.35 +2 -2 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.304.2.34
retrieving revision 1.304.2.35
diff -u -r1.304.2.34 -r1.304.2.35
--- build.xml 2 Oct 2002 14:48:48 -0000 1.304.2.34
+++ build.xml 4 Oct 2002 11:04:48 -0000 1.304.2.35
@@ -20,8 +20,8 @@
<property name="Name" value="Apache Ant"/>
<property name="name" value="ant"/>
- <property name="version" value="1.5.1"/>
- <property name="manifest-version" value="1.5.1"/>
+ <property name="version" value="1.5.2alpha"/>
+ <property name="manifest-version" value="1.5.2"/>
<property name="debug" value="true"/>
<property name="chmod.fail" value="true"/>
No revision
No revision
1.234.2.3 +0 -15 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.234.2.2
retrieving revision 1.234.2.3
diff -u -r1.234.2.2 -r1.234.2.3
--- index.html 4 Oct 2002 08:39:17 -0000 1.234.2.2
+++ index.html 4 Oct 2002 11:04:48 -0000 1.234.2.3
@@ -110,21 +110,6 @@
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="Ant 1.5"><strong>Ant 1.5</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <h3>Fix for Cygwin problem in wrapper script
available</h3>
- <p>The wrapper script of Ant 1.5 needs to be
replaced with a new
- version for Cygwin users. See the <a
href="faq.html#1.5-cygwin-sh">FAQ</a> for details.</p>
- <p><a href="./antnews.html">Read more news
about Ant</a></p>
- </blockquote>
- </td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Apache Ant"><strong>Apache Ant</strong></a>
</font>
</td></tr>
No revision
No revision
1.102.2.3 +20 -18
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
Index: Javac.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.102.2.2
retrieving revision 1.102.2.3
diff -u -r1.102.2.2 -r1.102.2.3
--- Javac.java 23 Jun 2002 01:33:43 -0000 1.102.2.2
+++ Javac.java 4 Oct 2002 11:04:49 -0000 1.102.2.3
@@ -214,7 +214,7 @@
*/
public Path createSrc() {
if (src == null) {
- src = new Path(project);
+ src = new Path(getProject());
}
return src.createPath();
}
@@ -282,7 +282,7 @@
*/
public Path createSourcepath() {
if (compileSourcepath == null) {
- compileSourcepath = new Path(project);
+ compileSourcepath = new Path(getProject());
}
return compileSourcepath.createPath();
}
@@ -317,7 +317,7 @@
*/
public Path createClasspath() {
if (compileClasspath == null) {
- compileClasspath = new Path(project);
+ compileClasspath = new Path(getProject());
}
return compileClasspath.createPath();
}
@@ -354,7 +354,7 @@
*/
public Path createBootclasspath() {
if (bootclasspath == null) {
- bootclasspath = new Path(project);
+ bootclasspath = new Path(getProject());
}
return bootclasspath.createPath();
}
@@ -391,7 +391,7 @@
*/
public Path createExtdirs() {
if (extdirs == null) {
- extdirs = new Path(project);
+ extdirs = new Path(getProject());
}
return extdirs.createPath();
}
@@ -666,11 +666,11 @@
// compile lists
String[] list = src.list();
for (int i = 0; i < list.length; i++) {
- File srcDir = project.resolveFile(list[i]);
+ File srcDir = getProject().resolveFile(list[i]);
if (!srcDir.exists()) {
- throw new BuildException("srcdir \""
- + srcDir.getPath()
- + "\" does not exist!", location);
+ throw new BuildException("srcdir \""
+ + srcDir.getPath()
+ + "\" does not exist!",
getLocation());
}
DirectoryScanner ds = this.getDirectoryScanner(srcDir);
@@ -756,8 +756,10 @@
String compilerImpl = getCompilerVersion();
if (fork) {
if (isJdkCompiler(compilerImpl)) {
- log("Since fork is true, ignoring compiler setting.",
- Project.MSG_WARN);
+ if (facade.hasBeenSet()) {
+ log("Since fork is true, ignoring compiler setting.",
+ Project.MSG_WARN);
+ }
compilerImpl = "extJavac";
} else {
log("Since compiler setting isn't classic or modern,"
@@ -793,19 +795,19 @@
*/
protected void checkParameters() throws BuildException {
if (src == null) {
- throw new BuildException("srcdir attribute must be set!",
- location);
+ throw new BuildException("srcdir attribute must be set!",
+ getLocation());
}
if (src.size() == 0) {
- throw new BuildException("srcdir attribute must be set!",
- location);
+ throw new BuildException("srcdir attribute must be set!",
+ getLocation());
}
if (destDir != null && !destDir.isDirectory()) {
throw new BuildException("destination directory \""
+ destDir
+ "\" does not exist "
- + "or is not a directory", location);
+ + "or is not a directory",
getLocation());
}
}
@@ -839,7 +841,7 @@
// finally, lets execute the compiler!!
if (!adapter.execute()) {
if (failOnError) {
- throw new BuildException(FAIL_MSG, location);
+ throw new BuildException(FAIL_MSG, getLocation());
} else {
log(FAIL_MSG, Project.MSG_ERR);
}
No revision
No revision
1.2.2.1 +11 -1
jakarta-ant/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
Index: FacadeTaskHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- FacadeTaskHelper.java 18 Apr 2002 14:19:00 -0000 1.2
+++ FacadeTaskHelper.java 4 Oct 2002 11:04:49 -0000 1.2.2.1
@@ -164,4 +164,14 @@
tmp.copyInto(res);
return res;
}
+
+ /**
+ * Tests whether the implementation has been chosen by the user
+ * (either via a magic property or explicitly.
+ *
+ * @since Ant 1.5.2
+ */
+ public boolean hasBeenSet() {
+ return userChoice != null || magicValue != null;
+ }
}
No revision
No revision
1.2.2.1 +13 -0
jakarta-ant/src/testcases/org/apache/tools/ant/util/facade/FacadeTaskHelperTest.java
Index: FacadeTaskHelperTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/util/facade/FacadeTaskHelperTest.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- FacadeTaskHelperTest.java 15 Apr 2002 13:20:26 -0000 1.2
+++ FacadeTaskHelperTest.java 4 Oct 2002 11:04:49 -0000 1.2.2.1
@@ -84,4 +84,17 @@
fth.setImplementation("baz");
assertEquals("baz", fth.getImplementation());
}
+
+ public void testHasBeenSet() {
+ FacadeTaskHelper fth = new FacadeTaskHelper("foo");
+ assertTrue("nothing set", !fth.hasBeenSet());
+ fth.setMagicValue(null);
+ assertTrue("magic has not been set", !fth.hasBeenSet());
+ fth.setMagicValue("foo");
+ assertTrue("magic has been set", fth.hasBeenSet());
+ fth.setMagicValue(null);
+ assertTrue(!fth.hasBeenSet());
+ fth.setImplementation("baz");
+ assertTrue("set explicitly", fth.hasBeenSet());
+ }
}
No revision
No revision
1.20.2.3 +0 -9 jakarta-ant/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/xdocs/index.xml,v
retrieving revision 1.20.2.2
retrieving revision 1.20.2.3
diff -u -r1.20.2.2 -r1.20.2.3
--- index.xml 4 Oct 2002 08:39:18 -0000 1.20.2.2
+++ index.xml 4 Oct 2002 11:04:49 -0000 1.20.2.3
@@ -17,15 +17,6 @@
</p>
</section>
- <section name="Ant 1.5">
- <h3>Fix for Cygwin problem in wrapper script available</h3>
- <p>The wrapper script of Ant 1.5 needs to be replaced with a new
- version for Cygwin users. See the <a
- href="faq.html#1.5-cygwin-sh">FAQ</a> for details.</p>
-
- <p><a href="./antnews.html">Read more news about Ant</a></p>
- </section>
-
<section name="Apache Ant">
<p>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>