Notes on Software Development, Technology and Life.

Thursday, June 23, 2005

Notes on Software Development, Technology and Life.: Laptop Sent For Repairs

Notes on Software Development, Technology and Life.: Laptop Sent For Repairs

I got the laptop back, took them almost a month to return it. Fortunately Averatec repaired it for free. Apparently the motherboard was damaged when I accidentally dropped it. They replaced the motherboard and the laptop is back in business.

Tuesday, June 21, 2005

Hibernate Synchronizer and Eclipse 3.1


Update, the latest Hibernate Synchronizer code on CVS fixes the problem. If you are having problems using Hibernate Synchronzier with Eclipse 3.1, get the latest code from CVS, build, deploy and the problem should go away.

I recently downloaded Eclipse 3.1 RC2. When I installed the Hibernate Synchronizer plugin, I was dissapointed to see that it doesn't work with Eclipse 3.1. When going to the properties page, an error message pops up, and Eclipse never shows the page. Looking at the error log, I noticed a ClassCastException.

I got the code from SourceForge CVS, noticed what was going on, and made a simple change to fix it. I would like to contribute my changes back to Hibernate Synchronizer. I emailed Joe Hudson, Hibernate Synchronizer's author, sending him a patch to incorporate my changes, but I haven't heard back from him.

Friday, June 17, 2005

Article Published in Eclipse Developer's Journal

I am happy to report that my previous blog entry got published in Eclipse Developer's journal:

Setting a Project Based on an Existing ANT Build File
— Two of the cool features in Eclipse 3.1, the ability to set a project based on an existing ANT build file and the ability to export a project settings to an ANT build file, attracted David Heffelfinger. But when he couldn't find any supporting information on the Eclipse web site he experimented for himself. Here he shares the results. http://eclipse.sys-con.com/read/99729.htm

Wednesday, June 15, 2005

Eclipse 3.1 ANT Build File Import/Export

What's New in Eclipse 3.1
— Since Eclipse's first release in 2001, it has become a popular environment for Java development. In the period between March 10 and May 11, 2005, users downloaded over 17,000 copies of one of the production SDK releases and over 3,500 copies of one of the stable (milestone) SDK builds on average every day. A vibrant eco-system of developers, plug-in providers, authors, and bloggers has grown up around it. Eclipse has also gained the backing of the key Java vendors including BEA, Borland, IBM, SAP, and Sybase. Developers like Eclipse because it provides a great platform for building Java applications, and companies like it because it unifies their software tools under one open source umbrella.


I was reading this article on JDJ about new features in Eclipse 3.1. One feature mentioned that caught my eye was the ability to set a project based on an existing ANT build file, and the ability to export a project settings to an ANT build file. Unfortunately the article didn't explain how to do this import/export. I searched Eclipse's help, to no avail. After some messing around with eclipse I found out how to do it.

To export your project settings to an ANT build file:
  1. Right click on any file in your project and click on "export" (thanks to Scott Stanchfield for clarifying that any file in the project will do).
  2. On the window that pops up, select "Ant Buildfiles" and click on "next".
  3. Select the appropriate project to use to generate the ANT buildfile.
  4. Click "finish".
You should now have two new build files on your project, "build.xml" and build-user.xml.

Any custom targets you create should go on build-user.xml, since build.xml will be overwritten every time a build file is generated.

To create a project from an existing ANT buildfile:
  1. Click on File->New->Project
  2. Select "Java Project from existing Ant Buildfile" and click "next".
  3. Enter a project name, and select the build file to use to create the project.
  4. Select the javac declaration to be used to define the project.
  5. Click "finish".
I hope these instructions are helpful to others out there.