Archive for Uncategorized

Jenkins Job DSL

Some notes, just to remember:


Schreibe einen Kommentar

image tools

Handling images should be easy if you dare to trust one of the big player tools like picasa or adobe lightroom.

If not some work has to be done. Some of this work could be done with one of the following tools.

– Bilderordner (german):
sorts images from one directory into multiple directories according to the day, the image was taken. That’s handy if you’re faced with more than one hundred of images or more than twenty different shooting situations, that to say, when you’re backing up your images from a point-and-click cam after a year of convenience.

– EXIF Date Changer:
Facing the situation that the battery of the cam has been empty and you missed to reconfigure the right date and time.

– Image Resizer:
Let you resize images from the (windows) context menu.

Schreibe einen Kommentar

Running Jenkins


Jenkins could run on its own with the winestone http server included.
To run it, simply call:

java -jar jenkins.war

But that’s no real life example, mine is:

JENKINS_HOME=/var/cit/jenkins java -jar /opt/jenkins/jenkins.war --httpPort=8082 --httpListenAddress=127.0.1 1> /opt/jenkins/jenkins.log 2>&1 &

And BTW, access it through an apache, only:


Jenkins folks update their software frequently, this is a simple update tool chain:

$ ps -ef | grep jenkins
$kill -9 ...
$ cd /opt/jenkins
$ wget -O jenkins-1.234.war
$ rm jenkins.war; ln -s jenkins-1.234.war jenkins.war
$ # run.. , see above

Schreibe einen Kommentar

Java, SQL with Maven, HSQLDB and Eclipse

Keep it simple, but not too simple [Einstein]


It’s not trivial to create a simple java project, at least there are these dependencies to manage. Further you may need an database server to do the first steps to an serious application (and testing)

A Solution

My solution uses

  • maven to create the application structure. Mind that a lot of open source applications use that structure
  • maven to manage the dependencies of the application
  • hsqldb as a lightweight database server
  • eclipse to code and test

Create the application structure

Here is what I use [theReference]

mvn archetype:generate \
  -DgroupId=your_tld.your_groupId \
  -DartifactId=your_app_name \
  -DarchetypeArtifactId=maven-archetype-quickstart \

(remember to replace: „your_tld.your_groupId“ and „your_app_name“)

So I get, what I want, an simple java project:

$ find your_app_name/

So maven created an source tree, an file „pom.xml“ an application file and it’s test pendant, too.

Now create the eclipse files, that’s simple, merely call:

$ cd your_app_name
$ mvn eclipse:eclipse

and get the files (.classpath and .project):

$ ls -alh
. .. .classpath .project pom.xml src

You may run this application file now with mvn package, but that’s not my focus here.

Handle an dependency

Let’s explain how to add an dependency, wisely that for [hsqldb]. To find the latest version use the product homepage or one of the repository viewers [example]. Mind: there is hsqldb/hsqldb and org.hsqldb/hsqldb, use the later one for current releases.

Dependencies with maven are managed within the file „pom.xml“

Due to the created test file there already is an dependency to JUNIT, so place the one we want to need beside of it:


Now it’s time to retrieve the dependency from the (default) repository „maven-central“. You may do this implictly by building the application (mvn package) but there’s an explicit command as you may expect:

mvn dependency:resolve

See what you’ve done:

$ ls -1 $HOME/.m2/repository/org/hsqldb/hsqldb/2.2.4/

Now again you may update your eclipse file (mvn eclipse:eclipse):

<classpathentry kind="var" path="M2_REPO/org/hsqldb/hsqldb/2.2.4/hsqldb-2.2.4.jar"/>

It created an Eclipse-Classpath-Variable called M2_REPO, which abstractly define the real path under your home-directory (see above).

Manage HSQLDB through Eclipse

I prefer to create one or more run configurations  in eclipse to run the hsqldb and it’s manager application.

First, for the server

  • Name: hsqldb-server
  • Main class: org.hsqldb.Server
  • Programm arguments: --database.0 file:your_db_name --dbname.0 your_db_name
  • Mind: replace „your_db_name“ (twice)

Second, for the Swing-Manager

  • Name: hsqldb-manager
  • Main class: org.hsqldb.util.DatabaseManagerSwing
  • Programm arguments: --driver org.hsqldb.jdbcDriver --url jdbc:hsqldb:hsql://localhost/your_db_name --user "SA" --password ""
  • Mind: replace „your_db_name“ again and realize that works only if you provide this configuration by the first time you start the manager and providing your settings.

Mind, that creates files in your „.metadata“ which you may want to backup:

$ ls -1 ..\.metadata\.plugins\org.eclipse.debug.core\.launches | grep hsqldb

Schreibe einen Kommentar