ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Debug Struts/J2EE built with Ant?
Date Thu, 29 Jan 2004 15:26:37 GMT
> From: Paul, R. Chip []
> Our team is currently using Jdeveloper, but I've created an Ant build that
> currently gets used by CruiseControl for Cont. Integration and nightly
> builds.  I'd like to move to Eclipse, but when I do would like to just use
> my Ant buildfile and not create whatever build eclipse uses.
> I've had this problem before with Idea... How can I debug a build/run done
> from Ant from within an IDE?  The app is a struts based web application
> deployed as an .ear file, but isn't technically J2EE.  The ear can be
> built
> and deployed via Ant to an Oracle OC4J app server running locally.

All modern Java IDEs can use JPDA to connect to a running Java VM and
debug it. I don't know about J2EE Apps deployed on servers, but we
routinely start our app with appropriate JPDA arguments, and attach to
it using IntelliJ (and NetBeans / Eclipse in other parts of the company).

Everything is done with Ant to compile, test, and start the app,
and the IDE is used for editing and debugging only.

Below's a sample <java> task using properties listed after it. --DD

    <java fork="true" ...>
      <jvmarg line="${jpda.options}" />

# Debugging using a Java Platform Debugger Architecture (JPDA) IDE:
# The additional <jvmarg>'s to use for the <java> task of the 'start' target
# (as well as the <junit> task of the 'test' target, to debug unit tests) to
# enable debugging using JPDA-compatible IDE (NetBeans, IDEA, Eclipse,
# (Defaults to the IntelliJ 3.x compatible JPDA arguments used by most.)

#jpda.transport = dt_socket
jpda.transport = dt_shmem

#jpda.suspend = y
jpda.suspend = n

#jpda.address = n
jpda.address = javadebug

jpda.options = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:\

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message