Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » apt ant task error output
apt ant task error output [message #242847] Fri, 13 April 2007 12:55 Go to next message
Eclipse UserFriend
Originally posted by: bbrady.broad.mit.edu

Hi,

The apt ant task from org.eclipse.jdt.apt.core.build.JdtApt outputs
coarse-grained error messages, simple "(Found X errors)", like that
shown below:

compile:
[apt] Building workspace
[apt] Building: /TestAntBuild
[apt] Invoking Java Builder on /TestAntBuild.
[apt] Cleaning output folder for TestAntBuild
[apt] Build done
[apt] Building: /TestAntBuild
[apt] Invoking Java Builder on /TestAntBuild.
[apt] Preparing to build TestAntBuild
[apt] Cleaning output folder for TestAntBuild
[apt] Analyzing sources
[apt] Compiling TestAntBuild
[apt] (Found 1 error) Compiling TestAntBuild
[apt] (Found 1 error) Build done

Does anyone know if it is possible to get apt to show more details
somehow? I didn't see how from the javadocs, but maybe I'm missing
something. Detailed error output like that from the ant javac task
would be preferred:

compile:
[javac] Compiling 1 source file to
C:\Local\Java\workspace_test\TestAntBuild
[javac] ----------
[javac] 1. ERROR in
C:\Local\Java\workspace_test\TestAntBuild\Test.java (at line 12)
[javac] asdfasdfasdfasdf;
[javac] ^^^^^^^^^^^^^^^^
[javac] Syntax error, insert "AssignmentOperator Expression" to
complete Expression
[javac] ----------
[javac] 1 problem (1 error)

Thanks,
Bob
Re: apt ant task error output [message #242852 is a reply to message #242847] Fri, 13 April 2007 12:59 Go to previous messageGo to next message
Jeff Care is currently offline Jeff CareFriend
Messages: 23
Registered: July 2009
Junior Member
Bob Brady wrote:

> Does anyone know if it is possible to get apt to show more details
> somehow? I didn't see how from the javadocs, but maybe I'm missing
> something. Detailed error output like that from the ant javac task
> would be preferred:

Just a guess, but have you tried cranking up Ant's logging level to
VERBOSE or DEBUG?

--
Jeffrey E. (Jeff) Care carej@us.ibm.com
WebSphere Application Server Systems Management Development
Re: apt ant task error output [message #242857 is a reply to message #242852] Fri, 13 April 2007 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbrady.broad.mit.edu

Thanks, Jeff, running ant with the -debug switch gives the error details
I was looking for. The apt task doesn't support debug="on".

-Bob


Jeff Care wrote:
> Just a guess, but have you tried cranking up Ant's logging level to
> VERBOSE or DEBUG?
>
Re: apt ant task error output [message #242861 is a reply to message #242847] Fri, 13 April 2007 16:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Bob Brady" <bbrady@broad.mit.edu> wrote in message
news:evnuk4$5kt$1@build.eclipse.org...
> Hi,
>
> The apt ant task from org.eclipse.jdt.apt.core.build.JdtApt outputs
> coarse-grained error messages [...]

Out of interest, are you using APT, that is, are you actually running
annotation processors? Or are you just using this as a way of getting a
headless Eclipse build?

Always interested in APT use cases...

-Walter Harley
JDT APT team
Re: apt ant task error output [message #242866 is a reply to message #242857] Fri, 13 April 2007 16:54 Go to previous messageGo to next message
Jeff Care is currently offline Jeff CareFriend
Messages: 23
Registered: July 2009
Junior Member
Bob Brady wrote:

> Thanks, Jeff, running ant with the -debug switch gives the error details
> I was looking for. The apt task doesn't support debug="on".

Sounds like a good enhancement request for the APT task: IMO you should
have to run Ant in debug mode to get these details (mostly because you
get deluged with the debug output of every other task).

--
Jeffrey E. (Jeff) Care carej@us.ibm.com
WebSphere Application Server Systems Management Development
Re: apt ant task error output [message #242871 is a reply to message #242861] Fri, 13 April 2007 17:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbrady.broad.mit.edu

No, we're not doing annotation processing. We're looking into using APT
for nightly headless builds that are aware of the
..settings/org.eclipse.jdt.core.prefs stored in subversion. These prefs
specify which warnings are to be treated as errors or ignored. We
decided on a prefs "gold standard" for our group and want to enforce
this on the nightly builds.

The JDT ant adapter doesn't have a parameter method like
prefFile="core.prefs" to make this easy. This case requires the
core.prefs file gets loaded by <property file="core.prefs"> and then
ant-contrib <for> be used to looping, a special string concat because
JDT adapter takes only one line of compilerargs for
line="-warn:+unusedLocal,unusedImport,..." etc. It is more complicated
than the apt task, but the apt task requires a workspace & eclipse home
be maintained for the nightly build machine.

-Bob

Walter Harley wrote:
> Out of interest, are you using APT, that is, are you actually running
> annotation processors? Or are you just using this as a way of getting a
> headless Eclipse build?
>
> Always interested in APT use cases...
>
> -Walter Harley
> JDT APT team
>
>
Re: apt ant task error output [message #242885 is a reply to message #242871] Fri, 13 April 2007 23:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Bob Brady" <bbrady@broad.mit.edu> wrote in message
news:evoet0$70r$1@build.eclipse.org...
> No, we're not doing annotation processing. We're looking into using APT
> for nightly headless builds that are aware of the
> .settings/org.eclipse.jdt.core.prefs stored in subversion. These prefs
> specify which warnings are to be treated as errors or ignored. We decided
> on a prefs "gold standard" for our group and want to enforce this on the
> nightly builds.

This is sort of what Eclipse itself does; the nightly builds ignore the
per-project warning settings and instead use global settings. You might
want to look into how that's achieved. They've been doing it for much
longer than the APT task has existed :-)
Re: apt ant task error output [message #242889 is a reply to message #242866] Fri, 13 April 2007 23:43 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Jeff Care" <carej@us.ibm.com> wrote in message
news:evocko$2fl$1@build.eclipse.org...
> Bob Brady wrote:
>
>> Thanks, Jeff, running ant with the -debug switch gives the error details
>> I was looking for. The apt task doesn't support debug="on".
>
> Sounds like a good enhancement request for the APT task: IMO you should
> have to run Ant in debug mode to get these details (mostly because you get
> deluged with the debug output of every other task).

Just to be clear here, the real enhancement request here should be for the
Platform to create an ant task to run Eclipse headless builds, so that you
don't have to use the APT task.

There may be some confusion between "apt" and "ant" going on. The APT task
was written specifically so as to permit people to run builds that required
Java 5 annotation processing: in the Sun JDK, apt is a separate command-line
tool, but in Eclipse there is no equivalent, so it's hard to create
command-line build scripts for projects if you have annotation processing
enabled.

Although APT is near and dear to my heart, I worry a little when I see it
taking on broad responsibilities like this :-) It's just a wee young
thing...
Previous Topic:AST: inserting comments and blank lines
Next Topic:OutlinePage
Goto Forum:
  


Current Time: Thu Oct 10 23:14:48 GMT 2024

Powered by FUDForum. Page generated in 0.04883 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top