How Do I Get Ant In Eclipse To Give Me Error Message


C

clu

Hello,

What are the steps that I have to do to get Ant (via file build.xml) to give me line by line error messages from my project.

Before trying the below techniques, my project compiled and ran perfectly.

Anyway, I decided I wanted to see syntax errors because it is of great use to me!

(1) So, I first tried going to Eclipse's menubar clicking on Run, External Tools, External Tools Configuration

And, adding "verbose" and even "debug" to the Arguments field, but when I compile, I get the following error message:

"The specified JRE installation does not exist."

I then went to the corresponding (above) JRE tab, but there was nothing to set. There were no JREs to choose from. I.E.: All the fields were blank.

I abandoned this attempt.

(2) I tried editing the build.xml file directly with minor success.

Near the top of the file I added the following code:

<record name="build.log" loglevel="verbose" action="start">

But, the resulting build.log file didn't have syntax errors in it.

For fun, I tried to set the same xml code to:

<record name="build.log" loglevel="debug" action="start">

But, that gave additional unuseful information.

What can I do to get the explicit syntax errors of a compilation using Ant with Eclipse.

My assumption is the debug option has to do with debugging a project and nothing to do with syntax errors from a compiler.

Thank you,
 
Ad

Advertisements

J

Joerg Meier

I then went to the corresponding (above) JRE tab, but there was nothing to set. There were no JREs to choose from. I.E.: All the fields were blank.
I abandoned this attempt.

That tab only lists the JREs you have configured for your Eclipse. Since
you apparently haven't configured any, it doesn't show any. That is easy to
remedy though: go to the menu, Window/Preferences/Java/Installed JREs, then
click on Add, select Standard VM, and point it to your JRE(s).

Those instructions are for Kepler, let me know if you use a different
version where the steps don't match.

Liebe Gruesse,
Joerg
 
J

Joerg Meier

ps.: All that being said, I have abandoned Ant a while ago, but I recall
the output of running it just going to the console window. Is that not the
case for you ?

Liebe Gruesse,
Joerg
 
C

clus

ps.: All that being said, I have abandoned Ant a while ago, but I recall

the output of running it just going to the console window. Is that not the

case for you ?

All it tells me is failed build or successful build.
 
C

clusardi2k

That tab only lists the JREs you have configured for your Eclipse. Since
you apparently haven't configured any, it doesn't show any. That is easy to
remedy though: go to the menu, Window/Preferences/Java/Installed JREs, then
click on Add, select Standard VM, and point it to your JRE(s).

Those instructions are for Kepler, let me know if you use a different
version where the steps don't match.

I did what you said, but I get the following message:

BUILD FAILED
Target "verbose" does not exist in the project

FYI:
I tried to add the following line (mentioned above) to the build.xml file:
<record name="build.log" loglevel="verbose" action="start">
But, the editor showed a red X mark on the first line (<project name =... >) of the build.xml file which said the following:
"Default target release does not exist in this project"

There were no errors with the build.xml file before adding the new line.
 
C

clusardi2k

That tab only lists the JREs you have configured for your Eclipse. Since
you apparently haven't configured any, it doesn't show any. That is easy to
remedy though: go to the menu, Window/Preferences/Java/Installed JREs, then
click on Add, select Standard VM, and point it to your JRE(s).

Those instructions are for Kepler, let me know if you use a different
version where the steps don't match.

Liebe Gruesse,

Joerg

Will the "verbose" option be enough to yield me all the syntactical errors?
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top