Archive for October, 2007

gMail IMAP

Tuesday, October 30th, 2007

Finally google have implemented IMAP for GMail. I set it up and it works quite nicely. Your ‘labels’, if you have any, are top level folders in IMAP and the google list of categories (All Mail, Drafts, Sent Mail, Spam, Starred, Trash) are all listed as folders within the [GMail] folder. Nice.

There are however a few things to note especially is using Thunderbird which has some interesting quirks when setting up IMAP accounts. Once you setup a new account (and before you login) its best to make the following changes to ensure smooth operation of your IMAP accoutn at gMail.

Server Settings

  • Security Settings
    You need to ensure you use SSL (port 993) when setting up your account connection in Thunderbird (and any other mail client I guess) as thats the default for gmail IMAP. Thunderbird does not allow you to specify this during the wizard account creation (as far as I am aware) but you can access it from the Server settings panel in the account configuration dialog box.
  • Server Settings
    Instead of storing deleted messages in the trach, its best to mark them as deleted this allowing gmail to manage the trash for you.

Copies and Folders

  • Deleted items
    The nice thing about gmail is that if you send using googles SMTP server, your mail will automatically be saved in your gmail ‘Sent Mail’ category. As such its kind of redundant to get Thunderbird to also store the mail in the Sent Items (either locally or on gmail) so you may like to disable this.
  • Drafts and Tempaltes
    Thunderbird by default stores Drafts and Templates (has anyone ever used these?) - to avoid these being created unnecessarily, you can select which folders to use or just set it to or store locally if you wish.

Once these things are setup you should be good to go. It is quite nice to have IMAP access to gmail as it means you can access your IMAPed gmail from other machines (and of course the web interface) and you have a consistent email experience. It seems to work much nicer than their POP access which was always a bit flakey - message status are nicely synchronized and centralised.

g.

Tricking Continuum : Self-Dependencies and the Antrun Plugin

Wednesday, October 24th, 2007

A project I’m working on was recently added to continuum to track build success. Unfortunately, we had to include the maven antrun plugin to handle two self-dependencies that the project has. I say unfortunate, because it made life hell to get the project to build when we changed version numbers. But, I have a solution.

The theory:
- before changing the version of the project, create the future version’s self-dependency jars.
- to do that, we need to change the antrun scripts to create new jars that will be used in the next project version. Commit to subversion and run continuum build.
- then we can change the pom to the next project version and when run in continuum it uses the jar created by the last version of the project. Maven2 then thinks it has the right jar, so the dependencies pass. The antrun scripts then fire off, and create the correct new jars that will be included in the project build.

The Implementation:
- if we’re on version 32, then change the scripts to create jars for version 33, and leave the project as version 32. Commit to subversion, then in continuum run build. Now we have project 32 that created jar 33 for us.
- The version for the project can finally be updated to 33, committed to subversion, and run successfully in continuum builds.

Now, for those of you not familiar with how to get antrun working in maven2, you need to add in the pom.xml in the plugins section:


<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<tasks>
<echo message="To skip install modify pom to not include maven-antrun-plugin"/>
<exec
dir="${basedir}"
executable="${basedir}/installLib.sh"
failonerror="true" />
<exec
dir="${basedir}"
executable="${basedir}/installXmlbeans.sh"
failonerror="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

For the installXmlbeans script we have something like the following: (directory xsd contains those files to be converted to xml beans)

VERSION=33
touch src/main/xsd/*
mvn -P installer xmlbeans:xmlbeans
mvn -P installer install:install-file -Dfile=target/projectname-xmlbeans.jar -DgroupId=com.twopaths.projectname -DartifactId=projectname-xmlbeans -Dversion=$VERSION -Dpackaging=jar

Hopefully this saves other people from the same continuum self-dependency versioning hell.

-Garrett

Eclipse update, fix for home and end keys

Friday, October 19th, 2007

2Paths Eclipse Distro v2
I’ve put together a new disto of the latest Eclipse wtp with some added plugin goodness. I’ve found this version to be much more stable than v1, and it even works on Lorill’s machine without too much trouble. Among the new features is a regex tester plugin, and a filter plugin that allows you to run command line tools such as sed against a selection in the text editor.

Also note that I’ve put together a 2Paths preferences file that remaps the home and end keys in eclipse, and adds in the 2Paths code formatting templates. To import, once you’ve got the new eclipse up and running, select import and choose preferences.

Download Eclipse 2Paths Edition v2 (155.6MB)

Fix for home and end keys
If you’re anything like me, you are used to having your home and end keys go to the start of the line of text and the end of the line, respectively. The way OS X does it drives me insane, and I’ve finally found a solution that even fixes it in firefox: KeyFixer.

KeyFixer is a free utility that remaps those keys, there are 2 versions, the standard one that remaps it in OS X and most apps, and KeyFixer for Firefox which is self explanatory. I recommend installing them both if you want your home and end keys back.

Download KeyFixer (60KB)

Download KeyFixer for Firefox (80KB)

Friday, October 19th, 2007

Seriously, No BullFluff

Friday, October 5th, 2007

Last week’s No Fluff Just Stuff symposium was undoubtedly the best Java event I’ve attended thus far, and the icing on the cake was Brian Sletten’s talk on “Beyond Cute-sy Mashups”. It was worth showing up for that alone. It’s not very often that it happens, but I’m stoked.

Below is my newly updated ‘Bleeding Edge Learning Curve Road Map’: