Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to avoid double-builds from console and from eclipse
How to avoid double-builds from console and from eclipse [message #758790] Thu, 24 November 2011 14:56 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 259
Registered: July 2009
Location: Germany
Senior Member
Hi to anyone,

I looked for my problem in internet and got very different even conflicting options which, so I ask here.

In our development-process we generate artifacts, which are compiled afterwards together with implemented java-files.

If a developer checks out a project and cleanly compiles his project, and he opens this project in Eclipse afterwards, the IDE builds all java-files, that are already built before, again. This takes a lot of time, because we have very large projects.

My questions:

1. I found a hint, that the eclipse-java-compiler does additional things to the classfiles, so it must run itself, even if classes are compiled by another JDK - is this correct?

2. Is there anywhere a solution for building our classfiles not twice?

Any help would be welcome,
Thanks by now

Best regards
Markus
Re: How to avoid double-builds from console and from eclipse [message #758838 is a reply to message #758790] Thu, 24 November 2011 16:51 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 545
Registered: July 2009
Senior Member
On 11/24/2011 8:26 PM, Markus Oley wrote:
> Hi to anyone,
> I looked for my problem in internet and got very different even
> conflicting options which, so I ask here.
> In our development-process we generate artifacts, which are compiled
> afterwards together with implemented java-files.
> If a developer checks out a project and cleanly compiles his project,
> and he opens this project in Eclipse afterwards, the IDE builds all
> java-files, that are already built before, again. This takes a lot of
> time, because we have very large projects.
> My questions:
> 1. I found a hint, that the eclipse-java-compiler does additional things
> to the classfiles, so it must run itself, even if classes are compiled
> by another JDK - is this correct?
I think apart from adding debug information to the class files, there
isn't much else that JDT compiler will do differently with the class files.

However, several other IDE features depend on compiler output which is
not just the class files. For example, it produces problem markers
(error and warnings) which are used to provide quick fixes.

> 2. Is there anywhere a solution for building our classfiles not twice?
> Any help would be welcome, Thanks by now

Can't you use the output of Eclipse compiler in your custom compilation
process ?

I think the problem you face is similar to those who use Maven. Maybe
you need to check with some Maven experts.

--
Deepak Azad
http://wiki.eclipse.org/JDT/FAQ
Re: How to avoid double-builds from console and from eclipse [message #758881 is a reply to message #758838] Thu, 24 November 2011 22:40 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 259
Registered: July 2009
Location: Germany
Senior Member
>Can't you use the output of Eclipse compiler in your custom compilation
>process ?

No, I guess that's the better way for us,
because we need a solution that runs both in jenkins (were we don't have installed any eclipse-instances) and on developer-hosts.

So is it possible to use another JDK in eclipse?


--
Deepak Azad
http://wiki.eclipse.org/JDT/FAQ[/quote]
Re: How to avoid double-builds from console and from eclipse [message #758890 is a reply to message #758881] Fri, 25 November 2011 05:09 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 545
Registered: July 2009
Senior Member
On 11/25/2011 4:10 AM, Markus Oley wrote:
>> Can't you use the output of Eclipse compiler in your custom
>> compilation process ?
>
> No, I guess that's the better way for us, because we need a solution
> that runs both in jenkins (were we don't have installed any
> eclipse-instances) and on developer-hosts.
It might be useful to ask this question in a jenkins forum.

> So is it possible to use another JDK in eclipse?
Eclipse only uses the libraries from a JDK, but the compiler used is
*always* the Eclipse Compiler.

Note that you can always disable 'Build automatically' in Eclipse and
use an external compilation mechanism. I just don't know how good an
development experience this will be.

--
Deepak Azad
http://wiki.eclipse.org/JDT/FAQ
Re: How to avoid double-builds from console and from eclipse [message #759045 is a reply to message #758890] Fri, 25 November 2011 19:29 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 259
Registered: July 2009
Location: Germany
Senior Member
Hi Depaak,

thank you for your answer.
OK, I guess I have to go another way....
I will adapt our buildprocess, that I can do generating without compile afterwards.
And then I compile it in eclipse.
Or I compile with JDT-compiler in commandline, if eclipse-home is set.

I guess, that will be a solution, that is OK,

Best regards
Markus
Previous Topic:Shortcut for "Open Annotated Classes"
Next Topic:Method not accessible
Goto Forum:
  


Current Time: Mon Dec 22 13:47:01 GMT 2014

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

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