Ant buid clears eclipse console - how to stop? - eclipse

whenever I do an ant build, my console results (Errors, warnings etc.) are deleted and it always Shows
"BUILD SUCCESSFUL
Total time: xxx milliseconds"
how can I prevent the ant file from overwriting my actual console Output?
thank you!

you can try this:
open "External Tools Configuration" (in my eclipse-ui its next to the green run button in the menu bar) -> open your ant runconfig -> go to "common" -> disable "Allocate console (necessary for input)"
this should prevent the overwriting of the console.
in my eclipse version (eclipse mars rc2) it leads to the situation that the current console is closed, but no ant console opens....i think this behaviour is not intended (maybe an eclipse bug). so its the half way to a solution: no ant output but still a deleted console output.
Maybe it works for your eclipse version
greetings

Related

How to make ant console always visible in eclipse?

When I have to see ant console every time I do "widow -> show view -> ant". And when the eclipse is restarted the ant console is hidden I need to do the same process again to see the ant window, is there any way that ant console is always open by default ?
When you have the ant console showing you can save your perspective so you will see it every time eclipse is started. http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-43e.htm

Build EAR in Eclipse Indigo

i created an EAR-Application in Eclipse Indigo and compile it via "run on server". All works well but i dont see the compile errors in the console. How can i make it visible?
Is where any way to compile an ear without having an AS running?
thx
BJ
Your code is compiled in the background, not when you invoke "run on server". To see compilation problems, you need to look in the Problems View rather than the console. If the Problems View is not visible in your current perspective, use "Window -> Show View" menu to find it.
To create a .ear file, you can use the "File -> Export -> Java EE -> EAR file" wizard.

Eclipse "Waiting for virtual machine to exit"

I'm working on a blackberry project using eclipse and bb-ant tools. I've created a build.xml file to perform the build. Everytime I try to run an Ant build, eclipse pops up the progress dialog and it hangs stating "Waiting for virtual machine to exit."
I downloaded an open source Blackberry project that has an ant build and it is showing the same behavior.
Does anyone have any suggestions?
Edit:
I used the command line to build my xml file and it built fine. However, when I tried from Eclipse it still hangs.
I've tried both the standard eclipse plugin directory and the path I downloaded ant to.
You could check if your ANT_HOME settings are correct (see also this blog post).
"Window > Preference > Ant > Runtime": "Ant Home Entries".
if the jars files are from a plugin directory (beside the default 'org.apache.ant_1.7.1.v20090120-1145' one) and not an independent ant installation, that might explain the problem.
Try clicking the "Ant Home" button on the right side and setting up ant home such as "C:\path\to\apache-ant-1.7.0"
There are similar bugs to this kind of situation (bug 173419, ticket 91).
It is worth checking the JVM used for the project.
It can also occurs when a ant task is poorly implemented.
You had the problem because the java version ant tries to run with is incorrect.
By default, eclipse will try to run the ant build with the java version it uses to compile the java files (Blackberry JRE), which won't work! You need to change the jre version by choosing "Run As... > Ant build". Before clicking run, go to the JRE tab, choose "Separate JRE:" and change "Blackberry JRE " to a standard java JRE. Press the run button and everything should work correctly.
I hit this problem also. Although I never used the same solution, you pointed me in the same direction.
I was using a ant file as a builder in my project, and I disabled the Allocate Console build option. This is when I hit the 'Waiting for virtual machine to exit'.
So I simply enabled the Launch in background option and it worked.

Eclipse - Galileo IDE force save of changed files before build?

When I used previous versions of Eclipse (e.g. Ganymede/Europa) if I had edited a file and then attempted a build Eclipse would prompt me to save first.
Since I updated to Galileo (Build id: 20090920-1017 & just checked for updates) when I build I'm not prompted to save first. Perhaps the dialog had a checkbox for "don't tell me again" which I mistakenly checked on???
I figure it is just a preference setting some where but I can't seem to find it, search in Preferences for 'save' and for 'build' but did not find it. I tried "Save automatically before build" but that actually did not work for me, and isn't really what I was looking for anyways.
Any ideas?
thanks.
Edit: I'm actually using an Ant script to 'build' (right click on script and Run As...Ant Build). So perhaps my original wording was a bit off base since I did not state how I was building.
It's under Window -> Preferences -> General -> Workspace -> Save automatically before build. This works for me if I'm doing an Eclipse build (Project -> Build All). Is that how you're building?
As mention in this thread, the only other options (other than the "Save automatically before build") which actually prompt for the user for file saving are:
> Run/Debug > Launching > Save required dirty editors before launching
> Run/Debug > Launching > [x] Build (if required) before launching
Answer of VonC looks great, but does not work as it seems (Eclipse 3.5.1.R35x_v20090910 on WinXP-Pro-32). However Eclipse and I seem to think differently about what is a "required dirty editor" :-( --
Would be nice if it would be possible to define a scope of resources to check for dirtyness for every single launch configuration -- with "containing project & refernced projects" as the default setting.
But it looks like 3.5.2 fixes this problem.

Ant build consoles get clobbered by dependent projects in Eclipse

I have a set of dependent projects in Eclipse, each with its own Ant build script. If I make a change in multiple projects, then select "Build All" (Ctrl+B), each Ant build is invoked in the correct order. But if there is an error in one project, Eclipse still tries to build the other projects also, and in the process clobbers the Ant console so that the build errors are no longer visible. This wouldn't be quite so annoying if I could open up the offending project and select "Build Project", but Eclipse out-smarts me: it won't rebuild until I open some file in the project, edit it, and save (typically I add and remove a space character wherever my cursor happens to be). An answer to any of the following questions would be welcome.
How can I configure Eclipse to (in preference order):
terminate a "Build All" as soon as any project's Ant build fails?
save all console output for "Build All" instead of resetting the console for each project?
spawn a separate console for each new instance of Ant?
allow me to force a "Build Project" even if it doesn't think anything has changed?
[UPDATE] Bonus Question:
How can I configure Eclipse so that fixing any build errors in a depended-on project counts as a "change" for the purposes of "Build Project"?
Have you tried redirecting standard out to file via a run configuration? A few screen shots to help if not... (you may try 'append' this is not in my screen shot :) )
One alternative is to have each Ant build log itself, e.g., using the following in build.xml
<record name="build.log"
loglevel="verbose"
append="false" />
Oddly, Eclipse seems to disable this logging somehow when running an Ant build.
I am not too big on ant, but can't you make the builds dependent on one another?