| Author |
eclipse auto-build task from outside eclipse
|
manuel aldana
Ranch Hand
Joined: Dec 29, 2005
Posts: 308
|
|
hi everyone, is there a possibility to use the eclipse auto-build functionality from outside eclipse? of course i could define an ant task (javac, move etc.), which could accomplish the same but this would be quite a lot to do (many classpath settings, referencing of other projects etc.). that is the reason i would like to use this eclipse-build in my automatic build step without manually starting and compile with eclipse. thanks a lot.
|
aldana software engineering blog & .more
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14460
|
|
I don't recommend it. My own personal experience is that I never want to rely on an IDE to be the one and only way to build a project. Microsoft cured me of that, as they have been quite bad at making IDE releases that are at odds with each other. And a great many other products as well, but that's another story. If you search this forum, however, I think I posted a copy of an XSLT file that can scan an Eclipse project file and build a prototype Ant build script. It can't handle everything, but it's a handy thing to have.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
manuel aldana
Ranch Hand
Joined: Dec 29, 2005
Posts: 308
|
|
yes, you're right, not to rely on an IDE. in my case it would be just a (quick) first step to automize the build before going to pure ant. i had a look in the forum for your interesting xslt script, but no success... could you post a link? thanks.
|
 |
Mr. C Lamont Gilbert
Ranch Hand
Joined: Oct 05, 2001
Posts: 1170
|
|
Eclipse itself can generate an ant file that does the build from within Eclipse. I assume this same ant file can be used from without eclipse. Also I think you can search Eclipse site for 'headless build.' I don't have any problem building from Eclipse. Especially considering its open source. I don't have much concern about it disappearing from my hard drive. [ April 30, 2007: Message edited by: Mr. C Lamont Gilbert ]
|
 |
manuel aldana
Ranch Hand
Joined: Dec 29, 2005
Posts: 308
|
|
thanks! headless build for eclipse made the hit.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26168
|
|
For anyone reading this in the future: Note that the headless build requires Eclipse to be installed, just not open as it uses Eclipse specific tasks.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14460
|
|
Originally posted by Mr. C Lamont Gilbert: I don't have any problem building from Eclipse. Especially considering its open source. I don't have much concern about it disappearing from my hard drive. [ April 30, 2007: Message edited by: Mr. C Lamont Gilbert ]
Well, I have some extremely old Microsoft install CDs and even a floppy or 3. The problem isn't with an IDE "disappearing", it's with an IDE project that's constructed for an antique version of your IDE that suddenly has to be rebuilt for an emergency bug fix. Remember, Microsoft doesn't know the meaning of the words "backwards compatability". This means that at 3 in the morning, I have had to rip my current IDE out, manually purge the registry, install the legacy IDE, hope that all its dependencies are met and that the chain doesn't snowball towards the outermost fringes of the OS and end up with me spending hours and hours getting set up to to a 15-minute repair job. Not to mention the work needed to restore the modern-day IDE and to convert the legacy project to be able to build properly under it. True, Eclipse is a lot saner. It doesn't have hooks into secret crannies of the operating system and its critical config files are all text and thus hackable in a pinch. And you can keep multiple versions of Eclipse in a system at once. But there's still a very good reason to not build you projects IDE-dependent. I used to work for a company that had several independent development groups. One was designated as the official "architecture group", meaning that the rest of us were supposed to get our tools from them. The problem was, the "architecture group" built all their projects under and IDE, and they had set up all manner of undocumented dependencies into their IDE configurations. So we could check out their source code, but lacking their departmental IDE setups, we couldn't build anything. And, of course, their IDE environments varied annoyingly from person to person and from year to year. We ended up ignoring their stuff and finding our own solutions because it was easier to get a clean build that way.
|
 |
 |
|
|
subject: eclipse auto-build task from outside eclipse
|
|
|