Archive for June, 2009

Maven Error: generics are not supported in source 1.3

2009/06/22 2 comments

Just stumbled across this error while trying to compile a simple Java Maven project:

Maven Error: generics are not supported in source 1.3

It turns out that maven uses the Java compiler 1.3 (!) by default. So you have to add the configuration settings to your pom.xml file…

See Hobione’s Blog entry on the same issue.

Installing Adobe AIR and TweetDeck on Ubuntu 9.04

2009/06/17 1 comment

This is a short manual on how to install Adobe AIR and Adobe AIR applications such as TweetDeck on Ubuntu 9.04 (This instruction should also work with most up-to-date Linux distributions). Once you have confirmed that everything works (i.e. TweetDeck works), you can delete all downloaded files.

  1. Download Adobe AIR from their homepage:
  2. Make AdobeAIRInstaller.bin executable

    $ chmod +x AdobeAIRInstaller.bin

  3. Install Adobe AIR

    $ sudo ./AdobeAIRInstaller.binThis will install Adobe AIR to /opt/Adobe AIR

  4. Download TweetDeck

    $ wget \

  5. Install TweetDeck using Adobe AIR installer

    $ /opt/Adobe\ AIR/Versions/1.0/airappinstaller

  6. This will open a GUI installer and automatically start TweetDeck. Furthermore, a starter will be created on your desktop.
  7. The desktop starter is just a script. Here’s the content:

    ~/Desktop$ cat \
    [Desktop Entry]
    Comment=Welcome to TweetDeck - a unique way to view your twitter timeline

  8. To uninstall Adobe AIR and Adobe AIR applications, select “Programs” -> “Applications” -> Adobe AIR Uninstaller”. This will also automatically uninstall Adobe AIR applications (i.e. TweetDeck).

My HelloWorld script for Maven

2009/06/15 2 comments

I’m still in the learning phase of using Maven, so bare with me. Here is my script to create an executable HelloWorld-jar file using Maven (it requires the file sample-pom.xml listed after the script):

# Description: Create a simple Java project using Maven.
# Status: Works
# Author: draptik
# Created: Mon Jun 15 21:17:24 2009
# ============
# 1. Maven
# 2. This script requires the file "sample-pom.xml"!!!
# 3. The "sample-pom.xml" file should be located in the same folder as
# this script.
# =====
# 1. Copy this script and "sample-pom.xml" to a newly created test
# folder (ie ~/tmp/maventesting/).
# 2. Run this script
# =======
# This script creates a "quickstart" Maven project, then overwrites
# the created pom.xml with something more sensible (including some
# useful Maven plugins), and runs "java -jar <your-program>.jar".

## User settings

## Static file
pdinfo="[PDINFO] "

## Delete old builds
echo "$pdinfo" "====== REMOVING PREVIOUS BUILDS ====================="
echo "$pdinfo" "rm -rf \"$appName\""
rm -rf "$appName"

## Create Maven skeleton
## NOTE: You can exchange the first 2 lines with:
## mvn archetype:create \
##         -DarchetypeGroupId=org.apache.maven.archetypes \
## This will result in a warning that "archetype:create" is
## deprecated. The warning states that you should use
## "archetype:generate". This archetype is interactive by default. To
## skip the interactive part and choose the default (="quickstart")
## you have to pass the option "-Dinteractive=false" to Maven.
echo "$pdinfo" "====== MAVEN CREATION ================================"
echo "$pdinfo" ""
mvn archetype:generate \
	-DinteractiveMode=false \
	-DarchetypeGroupId=org.apache.maven.archetypes \
	-DgroupId="$companyName" \

## Show the diff between generated pom.xml and sample-pom.xml
echo "$pdinfo" "====== DIFF BETWEEN GENERATED AND MY POM.XML ========"
echo "$pdinfo" "diff -u \"$appName\"/pom.xml \"$samplePom\" "
diff -u "$appName"/pom.xml "$samplePom" 

## Overwrite generated pom.xml
echo "$pdinfo" "====== OVERWRITING GENERATED POM.XML ================"
echo "$pdinfo" "cp  \"$samplePom\" \"$appName\"/pom.xml"
cp  "$samplePom" "$appName"/pom.xml

## Move to newly created project
cd "$appName"

## Make an executable jar file
echo "$pdinfo" "====== MAKING THE FINAL JAR FILE ===================="
echo "$pdinfo" "mvn package"
mvn package

## Move to target folder
cd target

## Run the Hello-World example
echo "$pdinfo" "====== TESTING THE JAR FILE =========================="
echo "$pdinfo" "java -jar $appName-1.0-SNAPSHOT.jar..."
echo "$pdinfo" "If the next line does not read \"Hello World!\", something is wrong"
java -jar "$appName"-1.0-SNAPSHOT.jar

Here is the file sample-pom.xml:

<project xmlns="" xmlns:xsi=""
Categories: IT, linux, windows Tags: , , , , ,

Maven-eclipse-plugin 2.6 might break wicket projects

2009/06/13 Comments off

Took me a while to find this, so I thought I’ll post it: Maven’s eclipse plugin version 2.6 does not work well with Wicket projects.

The problem with version 2.6 is that the Maven’s folder structure does not conform to Wicket’s folder structure. This seems to be fixed in version 2.7. Alternatively, you can use Maven-eclipse-plugin version 2.5.1.

See Martijn Dashorst’s blog and this thread on the wicket-user mailing list for details.

In short: If your pom.xml file contains


replace it with this


New in Ubuntu 9.04: screen-profiles, the enhanced GNU screen

2009/06/05 Comments off

My recent discovery: Ubuntu 9.04 comes with screen-profiles, a command-line “GUI” enhancement based on curses. If you have been using GNU-Screen for a while, but have always been too lazy to configure the display (or any other part of the program), you might enjoy this tool.

Lorna Jane posted a nice summary about screen-profiles.

Side note: This tool was actually developed by Canonical, the company behind Ubuntu.