2009年11月28日 星期六

Fixing a bug about using Eclipse 3.5 in Ubuntu 9.10

After upgrading to Ubuntu 9.10,
some buttons in Eclipse 3.5 failed to work using mouse click,
but it's fine using keyboard.

I googled for a while and found a workaround.
Just create a script and start your Eclipse using it.
And all the buttons should be working as usual.

#!/bin/bash
export GDK_NATIVE_WINDOWS=true
/path_to_your_eclipse/eclipse

Convert Ant projects to Maven

I have tried to convert some Ant projects to Maven.
Here's the steps using Eclipse and M2Eclipse:
  • Right click on Project, choose Maven -> Enable Dependency Management
  • Change project layout, add src/main/java, src/main/resources and src/test/java
  • Set output folder to target/classes or target/test-classes in project properties
  • Add pom.xml, and fix missing dependencies (You can use nexus or artifactory.)
  • Run mvn install and see if everything works