Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JUnit Called through Ant via Eclipse Hangs
JUnit Called through Ant via Eclipse Hangs [message #202483] Fri, 30 March 2007 18:32 Go to next message
Chris Gardner is currently offline Chris GardnerFriend
Messages: 8
Registered: July 2009
Junior Member
Environment: Windows XP Professional, Eclipse 3.2.2, Ant 1.6.5 (outside of
Eclipse)

I have a master build.xml file that orchestrates the build of 4 projects
(a, b, c, and d). There is also a build-common.xml that each project
build.xml imports. build-common.xml includes common targets, including a
test target that calls junit. The junit task doesn't override any forking
or classloading defaults. There is a third-party directory at the same
level as the individual project directories. Each project depends on jars
in third-party. The master build.xml and build-common.xml also live at the
same level as the project directories.

+ root
+ build-common.xml
+ build.xml
+ project.a
+ project.b
+ project.c
+ project.d
+ third-party

build.xml's basedir is set to "."

I call the master build.xml file in 3 ways: command line, Eclipse, and
CruiseControl. Note that I configured Eclipse to use an external ant 1.6.5
on my filesystem. All three calling methods successfully run the full
build, including the junit target for all projects.

I moved the master build.xml and build-common.xml to a new master-build
directory at the same level of the project directories and adjust the master
build.xml basedir to ".."

+ root
+ master-build
+ build-common.xml
+ build.xml
+ project.a
+ project.b
+ project.c
+ project.d
+ third-party

The compile and test will work from the command line, but when I call the
master build.xml through eclipse, one of the tests in project c hangs the
whole ant process. Up to the hanging test, project c compiles and the
tests pass. If I remove the hanging test and rerun, many of the tests will
run, but another test hangs. The CPU is still active. I also made my
ant.bat null out any CLASSPATH environment variable to no avail, though.
Any ideas as to why just moving locations (and adjusting location
properties) would do this?
Re: JUnit Called through Ant via Eclipse Hangs [message #202507 is a reply to message #202483] Fri, 30 March 2007 19:22 Go to previous messageGo to next message
Shankar Unni is currently offline Shankar UnniFriend
Messages: 19
Registered: July 2009
Junior Member
Chris Gardner wrote:

> The compile and test will work from the command line, but when I call the
> master build.xml through eclipse, one of the tests in project c hangs the
> whole ant process.

Is it trying to read, or even access, standard input, perhaps?

I used to run into problems like this with the Axis stub generator,
which tries to fiddle with standard input even though it really doesn't
read anything from there. (Putting it into the background on Linux
would get a SIGTSTP, but if you foreground it, it would run to
completion immediately).
Re: JUnit Called through Ant via Eclipse Hangs [message #202515 is a reply to message #202507] Fri, 30 March 2007 19:35 Go to previous messageGo to next message
Chris Gardner is currently offline Chris GardnerFriend
Messages: 8
Registered: July 2009
Junior Member
I don't believe it's waiting for standard input.

"Shankar Unni" <shankarunni@netscape.net> wrote in message
news:eujo20$i1s$1@build.eclipse.org...
> Chris Gardner wrote:
>
>> The compile and test will work from the command line, but when I call the
>> master build.xml through eclipse, one of the tests in project c hangs the
>> whole ant process.
>
> Is it trying to read, or even access, standard input, perhaps?
>
> I used to run into problems like this with the Axis stub generator, which
> tries to fiddle with standard input even though it really doesn't read
> anything from there. (Putting it into the background on Linux would get a
> SIGTSTP, but if you foreground it, it would run to completion
> immediately).
Re: JUnit Called through Ant via Eclipse Hangs [message #202531 is a reply to message #202515] Sat, 31 March 2007 00:43 Go to previous message
Chris Gardner is currently offline Chris GardnerFriend
Messages: 8
Registered: July 2009
Junior Member
I think I found it. I had to bump up MaxPermSize. Unfortunately, the JVM
wasn't telling me I needed to do it. I just made an educated guess.

"Chris Gardner" <chris.r.gardner@gmail.com> wrote in message
news:eujoqb$jl8$1@build.eclipse.org...
>I don't believe it's waiting for standard input.
>
> "Shankar Unni" <shankarunni@netscape.net> wrote in message
> news:eujo20$i1s$1@build.eclipse.org...
>> Chris Gardner wrote:
>>
>>> The compile and test will work from the command line, but when I call
>>> the
>>> master build.xml through eclipse, one of the tests in project c hangs
>>> the
>>> whole ant process.
>>
>> Is it trying to read, or even access, standard input, perhaps?
>>
>> I used to run into problems like this with the Axis stub generator, which
>> tries to fiddle with standard input even though it really doesn't read
>> anything from there. (Putting it into the background on Linux would get
>> a SIGTSTP, but if you foreground it, it would run to completion
>> immediately).
>
>
Previous Topic:Key bindings Linux KDE Eclipse 3.2.1
Next Topic:Error when trying to compile Java programs
Goto Forum:
  


Current Time: Thu Apr 25 06:59:30 GMT 2024

Powered by FUDForum. Page generated in 0.08704 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top