History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-12127
Type: Bug Bug
Status: Open Open
Assignee: Eugene Zhuravlev
Reporter: Dave Schweisguth
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Run ant target before launch doesn't seem to work

Created: 26 Mar 07 21:21   Updated: 27 Mar 07 22:00
Component/s: Ant Integration

Environment: MacBook Pro, MacOS X 10.4.8

Build: 6,148
Severity: High


 Description  « Hide
I have a run/debug config for an application which works fine.
I have an Ant build script configured into the project. Although it's red all over, because we define some properties in a separate file, all of the targets work both from the command line and when manually run from within Idea.
There is an Ant target I want to run before launching the app from within Idea. (It copies a jar into place for an applet.) I tried checking the "run ant target" in the "before launch" section of my run/debug config.
Although Idea lets me select the Ant target I want, when I hit OK and then reopen the run/debug dialog the target isn't shown. However, the target does get registered in radar.ipr:

<executeOn event="beforeRun" target="tapplet-copy" runConfigurationType="Application" runConfigurationName="MyApp" />

However, the target doesn't actually run when I run the app from Idea.



 All   Comments   Work Log   Change History      Sort Order:
Alexander Chernikov - 27 Mar 07 17:32
Actually to execute a target before Run it is not sufficient to provide settings in Ant Build Window. User has to set special flag ON in Run configurations. Usability problem IDEADEV-12657 describes this case in details. Please, check is this your case.

Dave Schweisguth - 27 Mar 07 22:00
Note that what I did originally was in the run/debug config, not the Ant build window.
When I tried to set up the build target to run before launch in the Ant build window, I got a similar result: the project file was modified as above, but nothing happened before launch.

While I was looking at the Ant build window it occurred to me that gray targets might not work. The target I was trying to run before launch was red in Idea and gray in the Ant build window. The red was because the target was in an included file but depended on a target in the file that included the red target. I rearranged targets to fix the red and now the target runs before launch, so my problem is solved.

Three possible residual bugs:

  • The red target ran manually from the Ant build window, just not automatically before launch. This is inconsistent.
  • The target is still gray for some reason. I don't understand what gray means ans the help doesn't say.
  • Maybe targets that depend on targets in files that include them shouldn't be red. Ant is perfectly happy to run such targets.
    Would it be useful to fie bugs or comment on any of those?