You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Paul, R. Chip" <RO...@saic.com> on 2004/01/29 15:55:47 UTC

Debug Struts/J2EE built with Ant?

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.

Chip Paul
Sr Software Engineer
ComFrame Software Corporation
 
Listen.Understand.Innovate
www.comframe.com


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


RE: Debug Struts/J2EE built with Ant?

Posted by didge <di...@foundrylogic.com>.
You can set up a remote debugging session with IDEA (from the Debug entries
dialog, select the Remote tab), but it's simple enough run or debug Ant
builds within IDEA itself, here's all you have to do:
0. Ensure that ant.jar is in your project's classpath.  I generally put
everything else that my app uses in the classpath, too, though it may not be
absolutely necessary.
1. Create a new debug configuration and set the main class to
org.apache.tools.ant.Main
2. Set the following VM parameters:
  a.  -DANT_HOME=<your ant home>
3.  Set the following program parameters:
  a.  [-f <your build file>] [-debug] target0 ...
4.  Set the working directory to the directory containing your build file.

I use this technique to debug custom ant tasks and you can even debug OC4J
within IDEA (the main class is com.evermind.server.OC4JServer,
set -DJAVA_HOME, and set the working directory to $OC4J_HOME/j2ee/home.)

With OC4J, you can follow their instructions for Building and Deploying
within a Directory
(http://download-west.oracle.com/docs/cd/A97688_13/generic.903/a97681/advanc
ed.htm#1010342) so that you won't have to redeploy between editing and
debugging.

didge

> -----Original Message-----
> From: Paul, R. Chip [mailto:ROY.C.PAUL.III@saic.com]
> Sent: Thursday, January 29, 2004 6:56 AM
> To: 'user@ant.apache.org'
> Subject: Debug Struts/J2EE built with Ant?
>
>
> 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.
>
> Chip Paul
> Sr Software Engineer
> ComFrame Software Corporation
>  
> Listen.Understand.Innovate
> www.comframe.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


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