ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: Possible bug in Ant 1.8.0
Date Wed, 17 Mar 2010 12:45:11 GMT
Hi Petar,

you are making me work early in the morning :(

For me everything works.

Regards,

Antoine

/Users/antoine/opt
bash-3.2$ popd
~/dev/junitbook2/ch06-stubs
bash-3.2$ ant -lib ~/opt/apache-ivy-2.1.0/*jar test
Buildfile: /Users/antoine/dev/junitbook2/ch06-stubs/build.xml
[ivy:retrieve] :: Ivy 2.1.0 - 20090925235825 :: 
http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url = 
jar:file:/Users/antoine/opt/apache-ivy-2.1.0/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: 
junitbook#stubs;working@antoine-levy-lamberts-macbook.local
[ivy:retrieve]     confs: [default]
[ivy:retrieve]     found junit#junit;4.6 in public
[ivy:retrieve]     found org.mortbay.jetty#jetty;7.0.0.pre5 in public
[ivy:retrieve]     found org.mortbay.jetty#servlet-api;3.0.pre4 in public
[ivy:retrieve]     found org.mortbay.jetty#jetty-util;7.0.0.pre5 in public
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/junit/junit/4.6/junit-4.6.jar ...
[ivy:retrieve] ................ (213kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] junit#junit;4.6!junit.jar (2266ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/junit/junit/4.6/junit-4.6-sources.jar ...
[ivy:retrieve] .......... (113kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] junit#junit;4.6!junit.jar(source) (2532ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/7.0.0.pre5/jetty-7.0.0.pre5.jar 
...
[ivy:retrieve] .............................. (377kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] 
org.mortbay.jetty#jetty;7.0.0.pre5!jetty.jar (2699ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/7.0.0.pre5/jetty-7.0.0.pre5-sources.jar

...
[ivy:retrieve] ........................... (277kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] 
org.mortbay.jetty#jetty;7.0.0.pre5!jetty.jar(source) (1719ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/7.0.0.pre5/jetty-7.0.0.pre5-javadoc.jar

...
[ivy:retrieve] 
................................................................
[ivy:retrieve] .... (904kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] 
org.mortbay.jetty#jetty;7.0.0.pre5!jetty.jar(javadoc) (3720ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api/3.0.pre4/servlet-api-3.0.pre4.jar

...
[ivy:retrieve] ................. (147kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] 
org.mortbay.jetty#servlet-api;3.0.pre4!servlet-api.jar (3235ms)
[ivy:retrieve] downloading 
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util/7.0.0.pre5/jetty-util-7.0.0.pre5.jar

...
[ivy:retrieve] ............... (153kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]     [SUCCESSFUL ] 
org.mortbay.jetty#jetty-util;7.0.0.pre5!jetty-util.jar (2736ms)
[ivy:retrieve] :: resolution report :: resolve 22910ms :: artifacts dl 
18929ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   4   |   4   |   4   |   0   ||   7   |   7   |
    ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: junitbook#stubs [sync]
[ivy:retrieve]     confs: [default]
[ivy:retrieve]     7 artifacts copied, 0 already retrieved (2187kB/69ms)

compile.java:
    [mkdir] Created dir: 
/Users/antoine/dev/junitbook2/ch06-stubs/target/classes
    [javac] /Users/antoine/dev/junitbook2/ch06-stubs/build.xml:41: 
warning: 'includeantruntime' was not set, defaulting to 
build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to 
/Users/antoine/dev/junitbook2/ch06-stubs/target/classes

compile.test:
    [mkdir] Created dir: 
/Users/antoine/dev/junitbook2/ch06-stubs/target/test-classes
    [javac] /Users/antoine/dev/junitbook2/ch06-stubs/build.xml:51: 
warning: 'includeantruntime' was not set, defaulting to 
build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to 
/Users/antoine/dev/junitbook2/ch06-stubs/target/test-classes

compile:

test:
    [mkdir] Created dir: 
/Users/antoine/dev/junitbook2/ch06-stubs/target/junit-reports
    [junit] Running com.manning.junitbook.ch06.stubs.TestWebClient
    [junit] Testsuite: com.manning.junitbook.ch06.stubs.TestWebClient
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.188 sec
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.188 sec
    [junit] ------------- Standard Error -----------------
    [junit] 2010-03-17 08:31:32.349::INFO:  Logging to STDERR via 
org.mortbay.log.StdErrLog
    [junit] 2010-03-17 08:31:32.375::INFO:  jetty-7.0.0.pre5
    [junit] 2010-03-17 08:31:32.774::INFO:  Started 
SelectChannelConnector@0.0.0.0:8080
    [junit] ------------- ---------------- ---------------
    [junit]
    [junit] Testcase: testGetContentOk took 0.363 sec
    [junit] Testcase: testGetContentError took 0.003 sec
    [junit] Testcase: testGetContentNotFound took 0.004 sec
    [junit] 2010-03-17 08:31:33.265::INFO:  Shutdown hook executing
    [junit] 2010-03-17 08:31:33.270::INFO:  Shutdown hook complete
    [junit] Running com.manning.junitbook.ch06.stubs.TestWebClient1
    [junit] Testsuite: com.manning.junitbook.ch06.stubs.TestWebClient1
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.096 sec
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.096 sec
    [junit]
    [junit] Testcase: testGetContentOk took 0.003 sec
    [junit] Running com.manning.junitbook.ch06.stubs.TestWebClientSkeleton
    [junit] Testsuite: 
com.manning.junitbook.ch06.stubs.TestWebClientSkeleton
    [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.08 sec
    [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.08 sec
    [junit]

BUILD SUCCESSFUL
Total time: 50 seconds
bash-3.2$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
bash-3.2$ ant -version
Apache Ant version 1.8.0 compiled on February 1 2010
bash-3.2$ ant -lib ~/opt/apache-ivy-2.1.0/*jar test

Petar Tahchiev wrote:
> Hi Antoine,
>
> I also thought about multiple versions of JUnit in the classpath,
> and I remember I checked it. Also I think Ivan was having the same
> problem with Ant 1.8.0, and the chances of we both having
> multiple versions of JUnit are now getting smaller :(
>
>
> I think the best would be if you can checkout the source and try it
> for yourself.
>
> Cheers, Petar.
>
> 2010/3/16 Antoine Levy Lambert <antoine@gmx.de>
>
>   
>> Hello Petar,
>>
>> Thinking loud ...
>>
>>
>> You made me google for ClassCircularityError. Do you know which classes are
>> meant to have circular dependencies upon each other ?
>>
>> I have a look at the source code of EachTestNotifier [1]. This class uses
>> org.junit.runner.notification.Failure.
>>
>> I do not see quickly what is supposed to be circular.
>>
>> Do you have maybe two different versions of junit somewhere in the
>> classpath ?
>>
>> Regards,
>>
>> Antoine
>>
>>
>>
>> [1]
>> http://github.com/KentBeck/junit/blob/7a2b0460c7abd7573faa9d7845a5b1169dcdcb7f/src/main/java/org/junit/internal/runners/model/EachTestNotifier.java
>>
>> Regards,
>>
>> Antoine
>>
>>
>>
>> Petar Tahchiev wrote:
>>
>>     
>>> Hi Ivan,
>>>
>>> nice catch ;) Yep, it works with the fork attribute.
>>>
>>> Thanks I'll buy you some shots of rakia ;)
>>>
>>> P.S. @Antoine or@ Stefan or @Steve, if you confirm this as
>>> a bug, I will open a ticket in the jira.
>>>
>>> 2010/3/15 Ivan "Rambius" Ivanov <rambiusparkisanius@yahoo.com>
>>>
>>>
>>>
>>>       
>>>> Hello Petar,
>>>>
>>>> Please try with fork="yes" attribute of junit task.
>>>>
>>>> Regards
>>>> Ivan
>>>>  Tangra Mega Rock: http://www.radiotangra.com/
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>>
>>>>
>>>>         
>>>>> From: Petar Tahchiev <paranoiabla@gmail.com>
>>>>> To: Ant Developers List <dev@ant.apache.org>
>>>>> Sent: Mon, March 15, 2010 9:26:02 PM
>>>>> Subject: Possible bug in Ant 1.8.0
>>>>>
>>>>> Hi guys,
>>>>>
>>>>>
>>>>>           
>>>> I was running the tests for my book with the latest version of
>>>>
>>>>
>>>>         
>>>>> Ant:
>>>>>
>>>>>
>>>>>           
>>>> Apache Ant version 1.8.0 compiled on February 1 2010
>>>>
>>>> and Ivy
>>>>
>>>>
>>>>         
>>>>> (version 2.1.0) and the tests in chapter 6 fail with the error:
>>>>>
>>>>>
>>>>>           
>>>> BUILD
>>>>
>>>>
>>>>         
>>>>> FAILED
>>>>>
>>>>>
>>>>>           
>>>> /home/petar/workspace/junitbook/ch06-stubs/build.xml:64:
>>>> java.lang.ClassCircularityError:
>>>>
>>>>
>>>>         
>>>>> org/junit/runner/notification/Failure
>>>>>      at
>>>>>
>>>>>
>>>>>           
>>>> org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:29)
>>>>
>>>>
>>>>
>>>>         
>>>>>  at org.junit.runners.ParentRunner.run(ParentRunner.java:226)
>>>>>        at
>>>>> junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>>>>>      at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
>>>>
>>>>
>>>>
>>>>         
>>>>> at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1339)
>>>>
>>>>
>>>>
>>>>         
>>>>> at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:807)
>>>>
>>>>
>>>>
>>>>         
>>>>> at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1794)
>>>>
>>>>
>>>>
>>>>         
>>>>> at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:761)
>>>>
>>>>
>>>>
>>>>         
>>>>>  at
>>>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>      at
>>>>>
>>>>>
>>>>>           
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>
>>>>
>>>>
>>>>         
>>>>> at
>>>>>
>>>>>
>>>>>           
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>
>>>>
>>>>
>>>>         
>>>>>  at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>      at
>>>>>
>>>>>
>>>>>           
>>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>>>
>>>> I
>>>>
>>>>
>>>>         
>>>>> am using Java:
>>>>>
>>>>>
>>>>>           
>>>> java version "1.6.0_18"
>>>> Java(TM) SE Runtime Environment
>>>>
>>>>
>>>>         
>>>>> (build 1.6.0_18-b07)
>>>>>
>>>>>
>>>>>           
>>>> Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed
>>>>
>>>>
>>>>         
>>>>> mode)
>>>>>
>>>>>
>>>>>           
>>>> and Ubuntu 9.1 66 edition. The funny thing is that it doesn't work
>>>>
>>>>
>>>>         
>>>>> with Ant
>>>>>
>>>>>
>>>>>           
>>>> 1.8.0RC1
>>>> but downgrading to Ant 1.7.0 and the build works just
>>>>
>>>>
>>>>         
>>>>> fine.
>>>>>
>>>>>
>>>>>           
>>>> If you want to test it you can checkout the source of the book from
>>>>
>>>>
>>>>         
>>>>> here:
>>>>>
>>>>>
>>>>>           
>>>>         
>>>>> href="
>>>>>
>>>>>
>>>>>           
>>>> https://junitbook.svn.sourceforge.net/svnroot/junitbook/trunk/junitbook2/
>>>> "
>>>>
>>>>
>>>>         
>>>>> target=_blank
>>>>>
>>>>>
>>>>>           
>>>> https://junitbook.svn.sourceforge.net/svnroot/junitbook/trunk/junitbook2/
>>>>
>>>> and
>>>>
>>>>
>>>>         
>>>>> go to chapter 6 and execute ant test.
>>>>>
>>>>>
>>>>>           
>>>> Has anyone seen this error
>>>>
>>>>
>>>>         
>>>>> before?
>>>>>
>>>>>
>>>>>           
>>>> --
>>>> Regards, Petar!
>>>> Karlovo, Bulgaria.
>>>> - - - - - - -
>>>>
>>>>
>>>>         
>>>>> -
>>>>>
>>>>>
>>>>>           
>>>> | Author @ Manning Publications.
>>>> | CEO @ Phamola
>>>> | BGJUG-Bulgarian
>>>>
>>>>
>>>>         
>>>>> Java User Group Leader.
>>>>>
>>>>>
>>>>>           
>>>> | Apache Maven Developer.
>>>> | Apache Jakarta PMC
>>>>
>>>>
>>>>         
>>>>> member.
>>>>>
>>>>>
>>>>>           
>>>> | Jakarta Cactus Lead Developer.
>>>> | Codehaus Plexus Developer
>>>> |
>>>>
>>>>
>>>>         
>>>>> Blogger:
>>>>>
>>>>>
>>>>>           
>>>>>> http://weblogs.java.net/blog/paranoiabla/
>>>>>>
>>>>>>
>>>>>>             
>>>>> - - - - - - - -
>>>>>           
>>>> Public PGP
>>>>
>>>>
>>>>         
>>>>> Key at:
>>>>>      href="
>>>>>
>>>>>
>>>>>           
>>>> https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
>>>> "
>>>>
>>>>
>>>>         
>>>>> target=_blank
>>>>>
>>>>>
>>>>>           
>>>> https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
>>>> Key
>>>>
>>>>
>>>>         
>>>>> Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>>>>>
>>>>>
>>>>>           
>>>>
>>>>
>>>>         
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message