Archive for the ‘Java’ Category.

mvnsh

Can’t wait using the latest maven goodies named mvnsh, but no binary are easely available See comments

Getting and compiling the latest maven shell can be frustrating the tool depends on a lots of snapshots libs which you’ll not find in a central repo yet.

So I wrote a mvnsh-settings.xml containing the following :

<settings>
    <profiles>
        <profile>
            <id>defaultProfile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>sonatype</id>
                    <url>http://repository.sonatype.org/content/groups/forge/</url>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                        <checksumPolicy>fail</checksumPolicy>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>fail</checksumPolicy>
                    </releases>
                </repository>
            </repositories>
        </profile>
    </profiles>
</settings>

Adapt the instruction found on mvnsh github page to use an alternate settings.xml using the -s switch :

git clone git://github.com/sonatype/mvnsh.git
cd mvnsh
mvn install -s mvnsh-settings.xml

And you can benefit from the colors, growl notifications etc…

Ou sont mes beans, contrats et workflows ? WOA et REST : Un changement de mentalité dans l’entreprise.

J’ai présenté une session aux ValtechDays 09 avec Sadek Drobi intitulée “Ou sont mes beans, contrats et workflows ? WOA et REST : Un changement de mentalité dans l’entreprise.”. Les slides sont disponibles en téléchargement et sur slideshare.

La session c’est bien déroulé, salle comble, j’ai entendu dire qu’il a fallu rajouter quelques chaises. On a eu un peu moins de 10 questions, ce que je trouve plutot pas mal, sans oublier 5 ou 6 tweets :) plutôt flatteurs.

Nabaztag Scala Library

nabaztagA few months ago, I have submited to google code a library written in Scala which send simple commands to a Nabaztag.

The library is pretty alpha, I’m not fluent in Scala yet. So they is probably a lot of things to refactor.
The library is build using maven-scala-plugin, you should be setup in a few seconds.

I was pretty happy of the library until I tried to used it from the java side, and feel the horror. I especially thought that they were some kind of “conversion” between common java type like an ArrayList into the equivalent in Scala. There is not, I was forced to use a Scala List from the java side…
After discussing it with scala fans there is two suggestions, avoid exposing raw Scala List and provides method to add, delete etc… or provide a Java interface binding nicely to the scala code.
I have not choosen yet which way to go.

This library is currently used daily during our daily build, it’s part of a TeamCity plugin sending commands to the nabaztag when something bad happen to our product build lines.
I may give away the corresponding teamcity plugin if time permits.

It especially good now, that the rabbit is saved ( in French )

Link :

Vote for Java6 on Leopard!

The latest version of MacOSX (Leopard) is out, and despite the fact that it comes out of the box with jdk5, apache maven, Junit and apache ant, there is no jdk6. I just can’t imagine spending my time in front of windows again.
Henry Story is calling for action, so here’s my contribution :

13949712720901ForOSX

More info at Javalobby.

Setting up a Maven repository

There is a good article up on TheServerSide named “Setting up a maven repository“, this is the kind of article I wish I have the time to write.

It sum up quite clearly the necessity of having some kind of proxy in front of your internal maven repository. At my current company we where using a alpha version of Maven Repository Manager, former name is archiva, which I depicted a few months ago. But we where more or less forced to abandon using it, due to our incapacity to understand how it worked ;) (read the software cost us too much time to maintain that it brought)

I did have lot of doubt of using Artifactory (the maven proxy detailed in the article) since it stores the files in a database. I just don’t understand this, apart maybe for the transactional behavior that it may brings. After reading it, and suffered once again of the network latency of ibiblio I will consider again artifactory.

This article is must read if you haven’t already this kind of software and you’re using maven.

Thanks to Gwena?l for the article link.

Link:

Maven 2.0.7

Maven 2.0.7 is out, this is the third releases in approx. 4 months. See releases notes. Nothing outrageously new but It’s great to see maven releases coming steadily.

Sonatype

Sonatype, a new company around Maven has just been announced (also here).

Having two companies supporting Maven, each having on board major project committers can’t be bad from an OSS point of view.

Let’s hope they come quickly with solid products, I’m pretty sure there is good money to be made out of maven related commercial tools.

Handy Eclipse Save Action

I was looking for Eric Lefevre blog post for a pointer on an Eclipse plugin which performs an “optimize imports” (ctrl-shift-o) and “format source code”(ctrl-shift-f) each time you save a file (ctrl-s).

But I just discovered today that Eclipse is doing it natively, at least in the version I’m using (3.3m3 Build id: I20070222-0951). And it’s doing a little bit more things (including removing those pesky trailing whitespace) :

Eclipse Save Action

No need for a plugin for now on, and if you’re like, quite parano?d when it comes to install plugin in your Eclipse install, this is a good news.