Sorry :(
* I have just changed the testcase war.xml so that the lib fileset is now
defined as a ZipFileSet in the build file, which is a first application of
having zipfileset having refids.

* In the code of the War.java task, the lib attribute is defined as a
ZipFileSet.
In the documentation, the same lib attribute is defined as a FileSet.
Should we fix the code or the documentation of the War task ?

* the failure of the test was due to :

- this code in ZipFileSet#getRef(Project p)

         if (!(o instanceof ZipFileSet)) {
            String msg = getRefid().getRefId() + " doesn\'t denote a
zipfileset";
            throw new BuildException(msg);
        } else {
            return (AbstractFileSet) o;
        }

- the fact that the lib attribute of the war task in the testcase was
defined as a <fileset>, not as a <zipfileset>

* shall I
  a) remove the ZipFileSet#getRef method , which means a fall back on
AbstractFileSet#getRef (status-quo ante), which should work too.

  or

  b) relax this ZipFileSet#getRef method and only make sure that we return
an instance of AbstractFileSet, so that other builds are not blown up

  or

  c) or write in WHATSNEW something like :
- only references to zipfileset(s) are accepted by tasks using zipfileset(s)
as attributes or nested elements. Definitions should therefore be changed to
zipfileset(s)

Antoine


----- Original Message -----
From: "Diane Holt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 19, 2003 11:11 AM
Subject: [GUMP] Test Failure - Ant


> ----------------------------------------------------
> This email is autogenerated from the output from:
> <http://cvs.apache.org/builds/gump/2003-04-19/test-ant.html>
> ----------------------------------------------------
>
>
>     [junit] Testsuite: org.apache.tools.ant.taskdefs.WarTest
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.06 sec
>
>     [junit] Testcase: testLibRefs(org.apache.tools.ant.taskdefs.WarTest):
Caused an ERROR
>     [junit] test doesn't denote a zipfileset
>     [junit] /home/rubys/jakarta/ant/src/etc/testcases/taskdefs/war.xml:16:
test doesn't denote a zipfileset
>     [junit] at
org.apache.tools.ant.types.ZipFileSet.getRef(ZipFileSet.java:299)
>     [junit] at
org.apache.tools.ant.types.ZipFileSet.getDirectoryScanner(ZipFileSet.java:22
2)
>     [junit] at
org.apache.tools.ant.taskdefs.Zip.grabResources(Zip.java:842)
>     [junit] at
org.apache.tools.ant.taskdefs.Zip.getResourcesToAdd(Zip.java:706)
>     [junit] at
org.apache.tools.ant.taskdefs.Jar.getResourcesToAdd(Jar.java:637)
>     [junit] at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:388)
>     [junit] at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:322)
>     [junit] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:231)
>     [junit] at org.apache.tools.ant.Task.perform(Task.java:399)
>     [junit] at org.apache.tools.ant.Target.execute(Target.java:309)
>     [junit] at org.apache.tools.ant.Target.performTasks(Target.java:336)
>     [junit] at
org.apache.tools.ant.Project.executeTarget(Project.java:1404)
>     [junit] at
org.apache.tools.ant.BuildFileTest.executeTarget(BuildFileTest.java:265)
>     [junit] at
org.apache.tools.ant.taskdefs.WarTest.testLibRefs(WarTest.java:84)
>     [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
>     [junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
>     [junit] at java.lang.reflect.Method.invoke(Method.java:324)
>     [junit] at junit.framework.TestCase.runTest(TestCase.java:154)
>     [junit] at junit.framework.TestCase.runBare(TestCase.java:127)
>     [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
>     [junit] at
junit.framework.TestResult.runProtected(TestResult.java:124)
>     [junit] at junit.framework.TestResult.run(TestResult.java:109)
>     [junit] at junit.framework.TestCase.run(TestCase.java:118)
>     [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
>     [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
>     [junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:318)
>     [junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask
.java:872)
>     [junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:562)
>     [junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:538)
>     [junit] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:231)
>     [junit] at org.apache.tools.ant.Task.perform(Task.java:399)
>     [junit] at org.apache.tools.ant.Target.execute(Target.java:309)
>     [junit] at org.apache.tools.ant.Target.performTasks(Target.java:336)
>     [junit] at
org.apache.tools.ant.Project.executeTarget(Project.java:1404)
>     [junit] at
org.apache.tools.ant.Project.executeTargets(Project.java:1278)
>     [junit] at org.apache.tools.ant.Main.runBuild(Main.java:611)
>     [junit] at org.apache.tools.ant.Main.start(Main.java:198)
>     [junit] at org.apache.tools.ant.Main.main(Main.java:245)
>
>
>     [junit] TEST org.apache.tools.ant.taskdefs.WarTest FAILED
>     [junit] Testsuite: org.apache.tools.ant.taskdefs.XmlPropertyTest
>     [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.348 sec
>

>
> BUILD FAILED
> /home/rubys/jakarta/ant/build.xml:1590: At least one test has failed.
>
> Total time: 5 minutes 5 seconds
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to