Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Converting a project to use Ant
Converting a project to use Ant [message #256943] Thu, 16 October 2008 08:26 Go to next message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

Hi,

I have a Java project and for a long time was satisfied with what
Eclipse delivers out of the box (clean, build automatically etc).
Recently, however, I wrote a quite elaborate ant build file to manage
releases etc. Now, if I do a clean with ant and a build after that,
Eclipse shows me a lot of problems like ‘import x.Y could not be
resolved’. The only way to solve this is to rebuild the project with
the Eclipse compiler (i.e. Project → clean → build after clean). I
think this is because some Java files are generated in the build process
by SWIG, so Eclipse doesn’t find them at first. But instead of checking
again after the build, it keeps all the error messages.

Is there a way to tell JDT to refresh all errors, without doing a full
build?

Or better: can I simply tell it to use the Ant build file as its basis,
instead of the built in builder? I know I can disable the JDT builder
and define an external builder based on the Ant file, but I am afraid I
will loose functionality that way?

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Re: Converting a project to use Ant [message #256948 is a reply to message #256943] Thu, 16 October 2008 09:15 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Hendrik Maryns wrote:
> Hi,
>
> I have a Java project and for a long time was satisfied with what
> Eclipse delivers out of the box (clean, build automatically etc).
> Recently, however, I wrote a quite elaborate ant build file to manage
> releases etc. Now, if I do a clean with ant and a build after that,
> Eclipse shows me a lot of problems like ‘import x.Y could not be
> resolved’. The only way to solve this is to rebuild the project with
> the Eclipse compiler (i.e. Project → clean → build after clean). I
> think this is because some Java files are generated in the build process
> by SWIG, so Eclipse doesn’t find them at first. But instead of checking
> again after the build, it keeps all the error messages.
>
> Is there a way to tell JDT to refresh all errors, without doing a full
> build?
>
> Or better: can I simply tell it to use the Ant build file as its basis,
> instead of the built in builder? I know I can disable the JDT builder
> and define an external builder based on the Ant file, but I am afraid I
> will loose functionality that way?

You're right, if you disable the JDT builder you will lose significant
functionality in Eclipse.
Have you tried doing a Refresh on the project after running your Ant
script? That will trigger Eclipse to verify the contents on disk and if
there were changes, for example to source code, it should do the
appropriate thing (such as compile the newly generated source). You can
even set up your Ant custom builder to automatically refresh the project
after it runs, so you don't have to do it manually (see the Refresh tab
of the Ant launch config dialog).

Hope this helps,
Eric
Previous Topic:replacing a token with the current date (plus time and/or version)?
Next Topic:How to access line nos. and position programmatically
Goto Forum:
  


Current Time: Sat Jul 12 07:37:01 EDT 2025

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

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

Back to the top