How do I need to set up my project to debug an Ant task?

I am currently developing an ant task in IDEA. How do I set up my project so that I can run the task from IDEA's ant panel and debug the code?

9 comments

You can right-click the file and choose "Add as Ant build file" or see the Ant
toolwindow on the right side of your screen.

Dirk Dittert wrote:

I am currently developing an ant task in IDEA. How do I set up my project so that I can run the task from IDEA's ant panel and debug the code?

0

Sorry, I think my descriptin above is misleading.

I want to run the Ant task from IDEA and then debug the source code of the task itself.

0

There's no jvm args field in the Ant panel to specify debug parameters, so I suggest the following.

1. Ensure that the "ant-launcher.jar" from an ant's distribution (for example from idea-home/lib/ant/lib) is in classpath of your
project.
2. Create the "Application" run configuration with the following settings:
- Main Class=org.apache.tools.ant.launch.Launcher
- VM Parameters=-Dant.home=<home-dir-of-your-ant-distribution>
- Program Parameters=-f <path-to-your-buildfile>

3. Now you can run/debug the Ant directly from IDEA.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Dirk Dittert" <no_mail@jetbrains.com> wrote in message news:26549703.1131022086492.JavaMail.itn@is.intellij.net...
>I am currently developing an ant task in IDEA. How do I set up my project so that I can run the task from IDEA's ant panel and
>debug the code?


0

i posted earlier asking if i could pass jvm args to ant,
guess the answer is NO
would jetbrains consider to add this feature?
best regards,
parthi

0

Thanks for you description.

I didn't get it to work with the IDEA internal Ant (probably set the ant.home wrong) but it now works with a separate Ant 1.6.5 installation.

Best,

Dirk Dittert

0

Sure. Please submit the issue to JIRA.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"


"parthi" <no_mail@jetbrains.com> wrote in message news:11457836.1131361048268.JavaMail.itn@is.intellij.net...
>i posted earlier asking if i could pass jvm args to ant,

guess the answer is NO
would jetbrains consider to add this feature?
best regards,
parthi



0

Hello there,
any idea when this will be implemented?
hopefully this does not require much of a work

thanks for your help

cheers,
parthi

0

It's planned for Demetra.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"parthi" <no_mail@jetbrains.com> wrote in message news:26279336.1135067773768.JavaMail.itn@is.intellij.net...

Hello there,
any idea when this will be implemented?
hopefully this does not require much of a work

>

thanks for your help

>

cheers,
parthi



0

Please sign in to leave a comment.