Olivier Lamy

Two Bays trail run 2016

Olivier Lamy - Sun, 01/24/2016 - 00:12
So I just started the year with a mid distance trail running.
Last year I did the 28km but decided to go for the 56km this year.
Training during summer and xmas period is a bit complicated and need some real motivation. But I finally managed to do a decent training.
The race was a bit complicated with the weather. I had some hard time with the hot (33° in some country bush part!!)
Bad eating strategy at the start. (eat too much...)
But so I did it. I would expect better time but the temperature really kills me on the way back. So I must be happy with this 7H for 56km and +1600m/-1600m.
I managed to build a video. So enjoy how is to run in Australia :-)
Strava activity here (Some GPS issues but I really did 56km :-) )
Next race is the rollercoaster 44km 27th February.
Then the big one of the year Ultra Trail Australia 100km in the Blue mountains.
And maybe the Surf coast century for a second time with a sub 12h goal (depends how the body will be in Jun :-) )
Categories: Olivier Lamy

SurfCoastCentury 100km the video

Olivier Lamy - Fri, 10/09/2015 - 02:36
So I finally found a bit of time to make a movie (please be indulgent I'm not a professional :-) )

If you have read the run report, here the video:

Yes I enjoyed a LOT :-)

I hope after watching this, you will want to come here down under for a little run :-)
Categories: Olivier Lamy

SurfCoastCentury 100km (my first ultra trail)

Olivier Lamy - Tue, 09/22/2015 - 05:45
I will try to tell you my journey to achieve this 100km trail called SurfcoatCentury because it happen on the surfcoast trails with some beach runs!
So I wanted to run this race maybe more than a year ago (even before my first marathon which I ran 12 october last year!).
But I have to train a lot first! Especially because I restarted doing sport seriously since around January 2013 (yup only for 18 months :-) ) after many years of very limited sport....
So during this year I managed to train a lot and do various long race bitumen and off road:
  • 17 May 2015: Great Ocean Road Marathon (44km )
  • 21 March 2015: RollerCoaster run (44km trail)
  • 11 January 2015: Two bays run (28km trail)
  • 12 Oct 2014: Melbourne Marathon
I remember someone saying: "your body must recover so you normally cannot run more than one or two marathons per year".
My answer was: "As my goal is to run 100km, those marathons are just training :-)"
Looking at the training log, I have 2000km running since 1st January 2015.
The hardest part was the 3 months before the big run. Despite a travel to France early July, I managed to run around 1200km from early June to the race (with a big August peak 470km). The France trip was not too bad as I ran a lot of off road compare to the city style suburb we live in Melbourne.
So here we are the big day!!!. Some stress coming!!! As I never ran more than 44km race (longest training was 48km) I don't know what will happen :-)
This start with the bag packing what to get what to wear etc... What to ask my great support crew to carry for various checkpoints...
The race start at 6.30am. We managed to find a house just 10 minutes walking from the start. For some reasons, I didn't want to ask my wife to drive me to a race start at 6.30am :-).
Obviously I didn't sleep a lot!
The program for today.

So here we are race start on a beach with an amazing sunrise!!! (for some reasons my wife prefer sunset over sunrise so she missed that one :P)



The first leg of the run is 21km of beach run: sand, cliff climbing and sometimes water until the knees (yup really wet shoes). Hopefully the sand is a bit humide so it's not soft sand.
The scenery is just amazing!!



After 21km we arrived at Torquay after passing trough beaches as Bells Beach, Point Addis (If you surf you know those mythics names). I managed to run those 21km in 2H30. Then I stopped 12 minutes. Yup that's too long as I didn't even change shoes but those long stops are the big mistake of this long run (but it was the first one so I didn't want to burn myself which I didn't for sure :-) ).
Now we are going back to Anglesea using the SurfCoast trails/walk (a mix of trail on the top of the cliff and a bit of bush) Again amazing scenery.


I'm happy as the family is here at Checkpoint3 so I got smiles and plenty of "Allez Papa!!" (Go Dad!!)






This leg2 is a bit more hilly: 28km with 520m elevation gain. I managed to run the first 11km with a good pace 6.22m/km then the last 17km at 7.20m/km.
I arrived at checkpoint 4 (mid race 50km) after 6h. Now time to change shoes/socks/t-shirt and got a lunch. I think here I made a BIG mistake as I stopped 35minutes!! Again I don't have the experience of such race so I did everything (eating/changing stuff) in a totally wrong order and do it bad. Next time: just have a printed TODO list with everything in a correct order. Other mistake I eat too much and too fast (sandwich and a banana) so my stomach was not really happy the next 15km :-(.



So now we start the leg 3 which is most difficult part of the race: 28km / 760 m elevation gain. Here an other completely different scenery with a real bush part!! You know the famous red/orange Australian ground and a bush forest!! And here I start to run long distance alone (the 50km runners are not here anymore) and runners are more streched after such distance.



But that's ok plenty of crazy birds!!. The first 20km are really good I managed a good 7.26m/km for this hilly part. But the next 7km are bad (really hard time in this last hard up hill): 9.13m/km during 7km (yup really slow!! especially I stopped too long at CP5 water point). I'm happy to finish this 3rd leg but a bit tired :-). I got help from Nicolas who is biking with me during the last part. So now an other smile time with the family at checkpoint 6. 77km done!! almost finished :-). An other mistake as I stopped too long again :-( (19minutes!!) but I was happy to have a chat with wife and kids.


So now time for the last leg, I still feel well (honestly you cannot give up after have done 77% of the race :-) ). The program is: 23km. Elevation gain / loss: 426m / 466m.


The first 9km are still a bit up/dow bush single track but then you are back to the ocean (you start thinking the finish line is not far anymore!!). Last checkpoint (CP7) (time to change for long sleeve and get head torch) wife/kids are here again for a last smile! See you "soon" at the finish line :-) This sunset really worth such a long run!! :-)





Now time to finish. But it's dark. I mean really dark as you are a middle nowhere without any lights from any cities.

And especially with the last beach run part around 4km (yup again beach run after 92km!!! Sacrebleu!!). So I do not see anything I just want to avoid running in the ocean :-).

Finally I can see lights wife/kids are here I can cross the line with the kids. That's it that's finished!! (yup you can't believe you only realise days after).





I believe I was crazy when I was thinking running this race more than a year ago. But now it's done and it was such an AMAZING experience.

It really worth all the hard training (wake up at 5am 5days/week during 2.5 months really need devotion/motivation the race is finally very easy compare to all the training).

I want to THANKS a lot wife and kids for all the support during this special and before when I was not here because training somewhere!!!

More details on my race here and the original race description (in a real good english :-) ).


My result. I'm happy to have finished (and with dignity). I think I could have made a better time especially with shorter break (but I'm French so I need long lunch break). It was my first experience on 100km so next one will be better :-)

And I already have some ideas for the next one. I'm pretty sure the family will be happy to visit the Blue mountains :-) ( see The north face 100 ).

I ran the race with a gopro so I have plenty of video materials to show you how Australia is such a beautiful country (but I need a bit of time to do it)
Categories: Olivier Lamy

Messieurs les contrôleurs de la SNCF vous faites un beau métier

Olivier Lamy - Wed, 07/01/2015 - 23:46
Pour nos vacances en France, nous avons choisi de passer une semaine en Bretagne (cela tombe à point c'est la canicule à Paris).
En fait non, il n'y a rien d'improvisé et les billets ont été réservés et PAYES il y a près de deux mois par internet (ce point est important dans la suite du post).
Le train part donc de Paris Montparnasse à 10:04 ce mardi 30 Juin 2015. Depuis le début de nos vacances, nous avions prévu de rendre notre voiture de location puis de prendre notre train pour nous rendre dans la belle et fraîche Bretagne.
Bonne idée n'est-ce pas? Oui nous le pensions mais c'était sans compter sur quelques petits détails que nous avions oubliés...
Nous étions jusqu'ici en banlieue Essonne sud. Nous pensions mettre environ 1H30 pour nous rendre à la gare. Grosse Erreur!! Cela nous a pris 2H.
Donc nous finissons le trajet en catastrophe, regardant constamment notre montre, énervés, faisons face à la grande incivilité (je dirais même l'égoïsme) des français au volant.... Un ensemble de sentiments que nous ne connaissions plus.
Donc arrivée à 10h et le train est dans 4 minutes!!
Le retour de la voiture chez le loueur s'effectue dans la plus grande des cohue possible.
Là la course commence. Petit rappel sur le contexte, nous sommes une famille avec 4 enfants avec un petit de 3 ans (qui ne marche pas tout le temps donc nous avons une poussette), deux autres filles de 7 et 12 ans et un garçon de 14 ans. Donc oui nous sommes chargés et nous n'avons à ce moment là plus que 3 minutes pour aller du parking Avis jusqu'au quai.
Les enfants comprennent la situation et se chargent de valises (pour une petite de 7 ans une valise cela peut-être très lourd mais elle nous aide bien).
Là avec ma poussette et mes deux valises à tirer, je comprends la difficulté des handicapés dans des lieux publics!!! Mais tant bien que mal nous y arrivons, montons dans le wagon de queue au moment de la sonnerie.
Un grand merci à ces passagers qui nous ont aidés à monter nos valises, poussettes et sacs. En plus il fait bien chaud en ce jour de canicule!!
Donc nous sommes dans le train. Enfin presque car le train se sépare à Rennes et nous allons devoir remonter les dix wagons pour nous mettre le plus près possible de la locomotive afin de changer de train en moins de 4 minutes. Encore de grand moments de sueur nous attendent!!
Dans toute cette course pas eu le temps de retirer les billets DEJA payés il y a plus de 2 mois. (oui je sais j'insiste un peu sur ce point) Donc un de mes premières préocupations est de trouver un contrôleur pour lui expliquer que bloqués dans les bouchons nous n'avons pas eu le temps de retirer nos billets mais que j'ai bien le numéro de dossier etc...
Sa réponse froide et sur un ton très ironique voire moqueur: "ne vous inquiétez pas monsieur nous allons bien nous occuper de votre cas". Je vous rappelle lecteurs que nous venons de courir dans la canicule parisienne chargés de sacs, valises et autres poussettes et que monsieur se permet de faire un humour très ironique....
Très naïevement, je pense un très court instant que ce contrôleur est en fait très sympathique et va arranger notre souci.
Donc nous commençons notre remontée de nos dix wagons. je vous assure que remonter dix wagons avec une poussette et les bagages pour une famille de 6 personnes ce n'est vraiment pas simple surtout lorsque le train est chargé et bon nombre de personne ne se donne même pas la peine de déplacer même légèrement les bagages qu'ils laissent au sol à moitié dans le chemin (oui c'est un peu dur de mettre son sac en hauteur pour ne pas gêner les autres...)
A mi chemin de notre remontée, nous croisons les contrôleurs (ceux que nous avions déjà prévenus à notre montée dans le train) qui nous demandent: "titre de transport s'il vous plait".
Donc je tente de discuter en expliquant de nouveau notre cas, donne mon numéro de dossier pour vérification (mais apparemment en 2015 les contrôleurs n'auraient pas de moyens nécessaires pour vérifier les billets associés à mon numéro de dossier). Je n'ai apparemment pas bien saisi la nuance entre e-billet et billets à retirer.
Soit mais mon billet je l'ai déjà payé et nous avons simplement eu de la malchance à cause des bouchons.
Le contrôleur m'explique qu'en fait je peux frauder et vouloir me faire rembourser mon billet mais quand même prendre le train!!!
J'avoue que pour un père de famille de 4 enfants c'est toujours un peu dur de se faire traiter de voleur devant ses enfants.
Je lui montre donc ma commande avec le mention "non échangeable, non remboursable". Donc là franchement, je ne vois pas comment je pourrais faire cela.
Mais non ces messieurs se montrent intransigeants et nous mettent 5 amendes de 122 euros.
Là j'avoue ne pas comprendre. Nos billets ont été payés et réservés plus de 2 mois à l'avance.
Je me calme, j'essaie de faire comprendre à mes enfants que non nous ne sommes pas des voleurs. Qu'il s'agit simplement de malchance.
Nous parvenons enfin à regagner la locomotive de tête. Et oui il nous reste encore à changer de train en moins de 4 minutes. Le tout en transférant une poussette et des bagages pour une famille de 6 et sans oublier que c'est la canicule en France...
Finalement nous y parvenons....
Je ne comprends toujours pas aujourd'hui comment ces contrôleurs ont pu nous mettre de telles amendes. Le prétexte de la non possibilité de vérifier l'état de notre dossier me semble un peu gros. Nous sommes tout de même en 2015 dans un pays civilisé doté de matériel technologique souvent de pointe.
Donc oui messieurs les contrôleurs je trouve que vous faites un bien beau métier en mettant des amendes à une famille de 4 enfants (qui a déjà payé ses billets!!). La cible est évidemment bien facile, il y a tellement d'autres endroits en France mais les cibles sont peu-être plus compliquées et demandent un peu plus de courage....
Categories: Olivier Lamy

Aussie Hackergarten

Olivier Lamy - Tue, 10/22/2013 - 13:19
The idea is to organize a Hackergarten in Melbourne and/or Sydney (maybe later in those wild north regions!)
The idea of such meeting is the ability for Open Source users to meet the Open Source contributors.

To do what?
Not only have beers!
Users/curious developers will be able to finally meet those bloody/lazy Open Source who never fix the issues but only think about implementing new non backward compatible features.
So now you will be able to navigate through the source code of a project, you want to fix an issue or implement a new feature and with the help of the developers.
Please provide your ideas and/or start discussions here: Google Groups or add a comment in this blog entry.
You can propose a project you want to see in those Hackergarten.
All languages/projects accepted!
Categories: Olivier Lamy

Error Prone compiler with Apache Maven Compiler plugin

Olivier Lamy - Mon, 08/05/2013 - 14:40
Because you usually write code very fast, you can sometimes made mistakes.
To prevent some stupid errors, folks from Google write the error prone compiler.
Have a look at the various detected patterns (yeah definitely more interesting than checkstyle :P )
Kudos to Alex Eagle for the contribution!.
The configuration to use it: <plugin> <groupId>org.apache.maven.plugins <artifactId>maven-compiler-plugin <version>3.1 <configuration> <compilerId>javac-with-errorprone </configuration> <dependencies> <dependency> <groupId>org.codehaus.plexus <artifactId>plexus-compiler-javac-errorprone <version>2.3-SNAPSHOT </dependency> <!-- this part can depend on your os --> <dependency> <groupId>openjdk <artifactId>tools <version>1.6 <scope>system <systemPath>${java.home}/../lib/tools.jar </dependency> </dependencies> </plugin> <!-- NOTE some artifacts are not yet released so you must use some snapshots repositories --> <repositories> <repository> <id>olamy.snapshots <url>http://repository-olamy.forge.cloudbees.com/snapshot <releases> <enabled>false </releases> <snapshots> <enabled>true </snapshots> </repository> <repository> <id>plexus.snapshots <url>https://oss.sonatype.org/content/repositories/plexus-snapshots/ <releases> <enabled>false </releases> <snapshots> <enabled>true </snapshots> </repository> </repositories> Feel free to test, I hope we will be able to have released versions of those artifacts soon.
Categories: Olivier Lamy

Huge Refactoring: Relocating to Melbourne, Australia

Olivier Lamy - Fri, 01/11/2013 - 15:38
NOTE: Not usual but this blog entry is not technical, you won't see any xml or java code :-)

That's how my 9 yo daughter see our new future life :-)



NOTE: I tried to explain to her it's not possible to have kangaroo as pet. So she answered to me: "Ok I prefer a koala" :-)

So we wanted to move to an english speaking country.
We merged our specs:
  • wife specs: country with good cupcakes and some beaches.
  • my specs: sunny country and good beer/wine


The short list was:
  • US: but no due to too much guns
  • UK: too much rain (and I'm French and you know the history :-) )
  • Canada: too cold !
  • Australie: cupcakes, beers, beaches and sun etc...


In fact the choice was pretty easy :-).
So we will relocate around mi march to Melbourne, Australia (Yes The most livable city in the world see http://en.wikipedia.org/wiki/World's_most_livable_cities).

While my wife will go to the beach, I will work for a small/medium company (I don't know yet what is small/medium/huge in this country): http://ecetera.com.au. (see smart people http://youtu.be/HGSg2kfW2sA).
The good news is 50% of my $DAYJOB will be continuing hacking on open source ! and the other 50% will be consulting/training on this open source.

<marketing&gt
If you need some consulting on open source in the Australia area contact me :-)
</marketing>

I'd like to thanks @Talend for the crazy 1,5 year dedicated to Apache hacking !
It was a really great pleasure to work with so amazing team !!
(@glenmazza this relocation will help me to reduce my english typos :P )

<personnal marketing in French>
Je vends ma maison située ici
Pas encore eu le temps de faire annonce dans un circuit de vente officielle.
L'annonce sera:
Maison individuelle de 140m2 sur un terrain de 650 m2 avec 5 chambres, 1 bureau, sous sol total. Située dans secteur calme, proche écoles, à 5 min du RER C.
Rez de chaussée: 1 chambre, 1 bureau, salle à manger, cuisine, salle de bains (refaite en 2006) et WC.
Etage (construit en 2008): 4 chambres, salle de bains et WC.
Libre Juillet 2013.
Si vous êtes intéressé envoyez moi un email: olamy AT apache DOT org
</personnal marketing in French>

NOTE: I'm looking for a small apartment only for myself @Melbourne for mid march until august. Contact me if you have some proposals.

Next blog entry will be probably from the other side of the world :-)
Categories: Olivier Lamy

Apache Maven site support Markdown !

Olivier Lamy - Fri, 10/26/2012 - 14:26
Maybe you don't know because that's not very well documented :-) but Maven site support Markdown format ! It's just a matter of configuring the site plugin ! <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.2</version> <dependencies> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-module-markdown</artifactId> <version>1.3</version> </dependency> </dependencies> </plugin> Now add your markdown files with .md extension in src/site/markdown

And that's it ! You are now "à la mode" and you use markdown :-)

I agree that must be per default and no need of extra xml to write

See the documentation of under incubation Helix project, we use Markdown (http://helix.incubator.apache.org)

Have Fun


Categories: Olivier Lamy

Test your local patch on a remote Jenkins with Maven

Olivier Lamy - Wed, 10/10/2012 - 18:36
Recently Kohsuke (@kohsukekawa) wrote a plugin to let you apply a patch on Jenkins job for testing purpose.
See Blog entry.

That's a pretty good idea as most of the time, you can have very long build. Integrations tests with selenium running on various os/browsers (some you don't have or don't want to install) or tests on various databases.

So usually hack, commit/push the change and cross fingers for not break the build on your Jenkins instance (don't tell me you never did that :-) ).

While ago I started a Maven plugin to be able to interact with github/jira (see blog entry).

So I have enhanced this plugin a bit to generate a diff/patch (I have tested on both svn/git) and post it to Jenkins to run the job with applying the patch on the job workspace.

NOTE: you need to install the Jenkins plugin first Patch Parameter Plugin.

Then run the following Maven cli: mvn patch-tracker:post -Dpatch.serverUrl=http://localhost:8080/job/maven-dependency-update-trigger-plugin -Dpatch.patchTrackerSystem=jenkins Maven will ask you user/password etc..

Now that's cool you can keep your local cpu/memory to listen musics, watch videos, play games etc... while your patch is tested on a remote Jenkins instance.

NOTE: The maven plugin is still in sandbox without any release. So you need to install it manually (sources are here: https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin) or consume it from this snapshot repository: https://repository.apache.org/content/repositories/snapshots

All feedbacks are welcome!

So Have Fun !


Categories: Olivier Lamy

Publishing a Maven site to a scm (ease Apache svnpubsub usage)

Olivier Lamy - Fri, 09/14/2012 - 22:36
The Apache Maven team just released a first version of a new plugin to be able to publish Maven websites to a scm. (Maven SCM Publish Plugin)
The first goal was to be able to commit web sites to the svnpubsub Apache infra for websites.

Remember the migration to svnpubsub is mandatory for the end of the year.

Yes you remember as (if you are an Apache committer) how long it can take to have a *.apache.org website live updated :-).

You usually scp to people.a.o and wait the end of rsync (long coffee break possible!) But now (thanks to Apache infra !), just commit your website to svn and the site is up2date within minutes !!

Note: as we have a Maven Scm Api we can support most of the supported scm by the Maven scm (honestly I have tested only svn and git :-)).
So it works too for git (github gh-pages included see documentation git branch section)

The trick is you must use different configuration and command line if you publish a mono module or multi modules build. See samples and documentation here:

Nice feature is the cleanup(delete) of not anymore generated files. They are now deleted from the scm. The plugin simply compare your generated website and the content from scm and take care of removing not anymore produced files.

Have a look at the other tips in this page.
The most important is to use the tryUpdate mode (not the default). <tryUpdate>true</tryUpdate> So have fun writing documentation on Apache projects and publish it to live very fast :P


Categories: Olivier Lamy

Maven Assembly/Dependency plugins useJvmChmod field WTF ?

Olivier Lamy - Mon, 08/27/2012 - 15:40
It looks not a lot folks knows a strange named option  from the Assembly and Dependency Maven plugins.
The name is useJvmChmod. Sure when reading this name you can say: "WTF ?????".
Both plugins use a component called plexus-archiver (which pack,unpack files and can set files permissions).
By default on unix platform, this component will fork a process to do chmod command line call and for each files (ouch !!!! for large distributions or unpack goal).
So long ago now (yup 2 years is long in our world :-)), I added a configurable mode to use file permission methods from jdk1.6 and not using anymore forked command line call to chmod.
This is why it's called useJvmChmod (sorry I'm sometimes not really good on naming marketing :-)).
By the way, if your build is still 1.5 that will works as it's done trough reflection (see initial commit ).
Note this option is available since assembly plugin 2.2 and it's now available in the fresh release of dependency plugin 2.5.1 (thanks to @atlassian folks for the issue report: https://jira.codehaus.org/browse/MDEP-368).
So if you assembly plugin or use unpack goal from the dependency don't miss this attribute to true!
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          or
          <artifactId>maven-dependency-plugin</artifactId>
          <configuration>
            <useJvmChmod>true</useJvmChmod>
          </configuration>
        </plugin>
NOTE: if you use useJvmChmod special permissions at group level won't be apply as it doesn't exists in java


Categories: Olivier Lamy

Maven Surefire configuration for CI server

Olivier Lamy - Thu, 08/02/2012 - 16:17
I used this configuration for long time now but not sure you know that.
The use case is an application creating a temp file to store values (File.createTempFile( "wine.txt", "wine" ); )
Running it locally no problem.
But now you have a ci server running the same Maven project with various parameters:
* one fast only executing unit tests
* one longer running selenium integration tests.

On Unix server, the temp directory is shared for all users (usually /tmp, /var/tmp etc...).
So if your build runs in parallel they will share the same file (can go to weird results ..)

To avoid such case, you can configure surefire plugin as it


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
          </systemPropertyVariables>
        </configuration>
      </plugin>

As it each build will use a separate tmp directory and temporary files won't be shared anymore.



Categories: Olivier Lamy

Java5 annotations support for Maven plugins

Olivier Lamy - Wed, 05/09/2012 - 22:34
So finally or at least (depends on your POV :-)), I have pushed some code to support Java5 annotations support for Maven plugins.
The "specs" are here https://cwiki.apache.org/confluence/display/MAVEN/Java+5+Annotations+for+Plugins.
The code is available in the branch http://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189/.
Snapshot are deployed to: https://repository.apache.org/content/repositories/snapshot .
You can have a look at it tests to see some samples: http://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/
Basically you need to setup your pom as it: <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>3.0-SNAPSHOT</version> <scope>compile</scope> </dependency> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> <version>3.0-SNAPSHOT</version> <configuration> <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> </configuration> <executions> <execution> <id>mojo-descriptor</id> <phase>process-classes</phase> <goals> <goal>descriptor</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <repositories> <repository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> <releases> <enabled>false</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories> Annotations to use are: @Mojo( name = "foo", defaultPhase = LifecyclePhase.COMPILE, threadSafe = true ) @Execute( goal = "compiler", lifecycle = "my-lifecycle", phase = LifecyclePhase.PACKAGE ) public class FooMojo extends AbstractMojo { /** * the cool bar to go * @since 1.0 */ @Parameter( expression = "${thebar}", required = true, defaultValue = "coolbar" ) protected String bar; /** * beer for non french folks * @deprecated wine is better */ @Parameter( expression = "${thebeer}", defaultValue = "coolbeer" ) protected String beer; /** * Plexus compiler manager. */ @Component protected CompilerManager compilerManager; /** * */ @Component( role = "org.apache.maven.artifact.metadata.ArtifactMetadataSource", roleHint = "maven" ) protected ArtifactMetadataSource artifactMetadataSource; public void execute() throws MojoExecutionException, MojoFailureException { // nothing } } Note: the help generation doesn't work yet !!
A new feature is your parent annotated classes can come from reactor project and from your project dependencies.
And don't complain yet too much in case of issues, it's a work in progress :-)
Have Fun!


Categories: Olivier Lamy

Search and browse with Archiva new UI

Olivier Lamy - Fri, 03/23/2012 - 17:50

If you follow me, you probably know I'm working on a new UI for Apache Archiva using plain html/javascript technologies (one page load app).
Here some screenshot about new Search and Browsing screens.

The new browsing

The new search
To test it just download:
  • zip with self contained jetty: http://s.apache.org/LAST_ARCHIVABUILD_ZIP
  • war to install in your favorite servlet container: http://s.apache.org/LAST_ARCHIVABUILD_WAR

So all comments are welcome :-)
And have Fun !


Categories: Olivier Lamy

Apache Archiva UI rewrite progress (How it works ? )

Olivier Lamy - Wed, 02/15/2012 - 14:53
Recently I proposed to rewrite the Apache Archiva UI. The goal was to have a new fresh/modern UI :-).
So as IANAD (D for designer) using Twitter Bootstrap was a good solution to help to start.
Regarding web framework buzz :-), I proposed to have a plain html/javascript (without any complicated Java web framework stack) maybe because it's "à la mode" :-).
At the end, it will be a one page load application with only javascript (data transfer with the server only tru REST call) and rendering with html/js template mechanism.
But here too there is some buzz around: which one to choose ? To have an easy UI automatic refresh, the data binding was something mandatory.
That's why http://knockoutjs.com/ was choosen !!
Furthermore it's a very active community, people are helping very quickly to help on mailing list and very documentation (something not usual on Open Source project :P ).
And definitely we didn't want waste time on philosophical discussions on various frameworks.
I promise I will write a blog entry soon on some tips to use this framework :-)

So the rewrite is in progress (see http://www.screencast.com/t/KX93fcKhHvE)
And some documentation on how it works has been started here
The top jira issue is here http://jira.codehaus.org/browse/MRM-1497.
Yes some job to do :-).
We are hiring :-) to complete all. So if you want to have fun with nice javascript framework. Do not hesitate to propose patches or pull requests tru https://github.com/apache/archiva.
Note: during the interview process, we won't ask complicated puzzle or scholar questions :-) you will be judged only on your patches proposal.

If you want to test the new UI, you can try the following steps : svn co https://svn.apache.org/repos/asf/archiva/all/ archiva-all-sources cd archiva-all-sources/archiva mvn tomcat7:run -pl :archiva-webapp-js -Pjs -Pdev -am Hit your browser : http://localhost:9091/archiva/index.html?request_lang=en

And after this UI rewrite, what's else ?
I'm thinking about plugins/extension points mechanism with UI part too. As the UI will be in full js, folks will have to write their plugins ui in js.
Maybe not only, Vaadin XS looks to be possible solution to study.
So stay tune for coming next news :-)


Categories: Olivier Lamy

Unit tests with embeded tomcat artifacts

Olivier Lamy - Sat, 01/21/2012 - 16:08
In the 7.x releases of Apache Tomcat, some maven artifacts are now published which include a nice and fluent embeded api to run a Tomcat instance.

So it's a nice opportunity to use it writing units to test servlets, rest api etc..
But until 7.0.25 it was only possible to do it with using a barcoding port which can cause some issues on ci servers where you are not sure ports are not used by something else running.

I have personally sended a RFC to ITEF to have port allocation for only my personal use on my birthday year or zip code port but strangely this RFC was never approved :-).

Now you can use the java ServerSocket port 0 feature to use any free port available on the machine.
It has been fixed with the issue 52028.

So now you can write a unit test as it (here a test with a REST service provided by Apache CXF).



@Before
public void startTomcat()
throws Exception
{
tomcat = new Tomcat();
tomcat.setBaseDir( System.getProperty( "java.io.tmpdir" ) );
tomcat.setPort( 0 );

Context context = tomcat.addContext( "", System.getProperty( "java.io.tmpdir" ) );

A context param in your web.xml:

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:META-INF/spring-context.xml</param-value>
</context-param>

In the code

ApplicationParameter applicationParameter = new ApplicationParameter();
applicationParameter.setName( "contextConfigLocation" );
applicationParameter.setValue( "classpath*:META-INF/spring-context.xml" );
context.addApplicationParameter( applicationParameter );

A listener class in your web.xml:

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

In the code

context.addApplicationListener( ContextLoaderListener.class.getName() );

CXF servlet declaration in your web.xml:

<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/restServices/*</url-pattern>
</servlet-mapping>

In the code:

tomcat.addServlet( context, "cxf", new CXFServlet() );
context.addServletMapping( "/restServices/*", "cxf" );

tomcat.start();

port = tomcat.getConnector().getLocalPort();

System.out.println("Tomcat started on port:"+port);
}



So now you can test/consume you REST services on localhost with the port.

Don't miss to shutdown the tomcat instance on tearDown or @After

@After
public void stopTomcat()
throws Exception
{
tomcat.stop();
}


If you use Maven you need the following dependencies:

<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<scope>test</scope>
<version>7.0.25<version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-juli</artifactId>
<scope>test</scope>
<version>7.0.25<version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<scope>test</scope>
<version>7.0.25<version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<scope>test</scope>
<version>7.0.25<version>
</dependency>


As samples talks more than long docs ("Code talks, bullshit walks" :-) ).
The tomcat maven archetype has been improved with a sample. (see previous post)

Have Fun!


Categories: Olivier Lamy

Tomcat Maven plugin archetype. Sample talks more than long documentation :-)

Olivier Lamy - Fri, 01/13/2012 - 11:35
As code sample talks more than long and borying documentation (or maybe because I don't like to write too long documentation :-) ), I have writen an archetype for the Apache Tomcat Maven Plugin.

Some features describe in this post are now implemented.

As it's not yet released but soon !, just use :

mvn archetype:generate \
-DarchetypeGroupId=org.apache.tomcat.maven \
-DarchetypeArtifactId=tomcat-maven-archetype \
-DarchetypeVersion=2.0-SNAPSHOT \
-DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/
....
[INFO] Using property: groupId = org.apache.tomcat.maven
Define value for property 'artifactId': : tomcat-sample (project will be created in ./tomcat-sample )
...
cd tomcat-sample


You can run your webapp with: mvn tomcat6:run or mvn tomcat7:run (depends on tomcat version you want)
And hit your browser to http://localhost:9090 and you will use a very complicated hello world webapp sample :-)

Now you can try: mvn clean install .
You will see a selenium test running (by default firefox), use -Pchrome for using chrome should work too with -Piexplore (not tested :-) ).

Note you have now an executable war.
Try it !

cd basic-webapp-exec/target/
java -jar basic-webapp-exec-1.0-SNAPSHOT-war-exec.jar -httpPort 9191


And hit your browser to http://localhost:9191.
So you have a tomcat7 running our fabulous application and without installing nothing !

More details on the project

This archetype build a simple project with some maven modules. IMHO it's nice layout to use.

basic-api (service interface)
basic-api-impl (service default impl)
basic-webapp (our webapp module)
basic-webapp-exec (module to generated executable war)
basic-webapp-it (module to run selenium tests with generated war)


The application is exposing a REST service called HelloService (in basic-api module)


@Path( "HelloService" )
public interface HelloService
{
@Path( "sayHello/{who}" )
@GET
@Produces( { MediaType.TEXT_PLAIN } )
String sayHello( @PathParam( "who" ) String who );
}


The implementation is in the module basic-api-impl.
Note we use Apache Cxf to provide REST services (for more details have a look at the various spring files).

The webapp is a simple page based on jquery and twitter bootstrap.

So have fun !


Categories: Olivier Lamy

From a pull request to a jira issue

Olivier Lamy - Sun, 11/27/2011 - 00:56
After the generate a patch and attach it to a jira issue, it's now the time to have a tool to create an issue from a patch request (the current implementation works only for github pull request).

So the Patch Tracker plugin has now a new goal called to-issue. This goal will read a github pull request and create an issue in your issue tracker (currently only supported for jira).

It's simple :-).
As sample see pull request : https://github.com/jenkinsci/jenkins/pull/320 and the created issue in jira: https://issues.jenkins-ci.org/browse/JENKINS-11883
I have just used the cli:

mvn patch-tracker:to-issue -Dpatch.request.id=320 -B

For easy configuration see the properties in the jenkins pom.

<project.patchManagement.system>github</project.patchManagement.system>
<patch.request.organisation>jenkinsci</patch.request.organisation>
<patch.request.repository>jenkins</patch.request.repository>
<project.patchManagement.url>https://api.github.com</project.patchManagement.url>

<patch.tracker.serverId>jenkins-jira</patch.tracker.serverId>


entry in settings:

<server>
<id>jenkins-jira</id>
<username>uid</username>
<password>password</password>
</server>


And that's it :-).

BTW if you need more features, patch (or pull requests) are welcome.

This maven plugin is in the maven sandbox @asf and not released, so if you want to try it you must have asf maven snapshot repo in your settings or buid it manually.
Sources are here:

  • https://github.com/apache/maven-sandbox (path plugins/maven-patch-tracker-plugin) yup no sparse checkout with git :P

  • http://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/



Some docs has been started here http://maven.apache.org/plugins/maven-patch-tracker-plugin (maybe not yet in sync so wait a bit)

Have fun !


Categories: Olivier Lamy

Life is too short to waste time uploading a patch or Maven Patch Tracker plugin

Olivier Lamy - Mon, 11/21/2011 - 21:33
Life is too short and you don't want to waste time contributing to a project (creating a patch, a entry in the jira issue tracker then upload the patch).
So the Maven Patch Tracker plugin is for you !



You will be able with a maven plugin to do all of this in one command line !
Without any configuration you have to write :

mvn patch-tracker:create
-Dpatch.summary="foo summary"
-Dpatch.serverUrl=http://localhost:8080/browse/MNG -B
-Dpatch.user=uid -Dpatch.password=pwd


If you find that boring or too long no problem, there is a solution for that (yes good developer are lasy developers they use tool to automate tasks :-) ).
So configure you pom, with the issue tracker id

<issueManagement>
<system>jira</system>
<url>http://host:ip/browse/projectKey</url>
</issueManagement>


Add a server entry in you settings.xml


<server>
<id>jira-maven</id>
<username>olamy</username>
<password>very complicated password for paranoiac security folks</password>
</server>


Reference this jira server in your pom:


<properties>
....
<patch.tracker.serverId>jira-maven</patch.tracker.serverId>
....
</properties>


Et voilà, just run and save fingers:

mvn patch-tracker:create -Dpatch.summary="foo summary" -B


NOTE: without -B the plugin will use a prompt mode to ask you confirmation on the values

An other mojo called update can add/update an issue with an other patch:

mvn patch-tracker:update -Dpatch.description="update of the issue with an other patch" -Dpatch.patchId=MNG-5203 -B

This command will update the issue MNG-5203 with an other patch.

NOTE: currently only jira is supported

The plugin will use the configured scm client configured tru your scm url to generate the patch/diff file.
So your project is configured with svn but for some reasons you use git svn.
No problem add the parameter: -Dscm.providerType=git

Other improvement I think: load the patch to review board.

Something else ?
Ideas and patches are welcome :-)

You can test it using the snapshot repo: https://repository.apache.org/content/groups/snapshots-group/ or build it yourself: http://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/

Have Fun and good hacking!


Categories: Olivier Lamy

Archiva 1.4-M1 released

Olivier Lamy - Wed, 10/26/2011 - 13:32
The Apache Archiva 1.4-M1 has been released.
Some nice features added:

  • It is now possible to create a staging repository for any managed repository and later merge the results.

  • You can now use REST services to control Archiva or search for artifacts. See REST Services for more information.

  • Database storage for repository metadata has been replaced with a JCR repository based on Apache Jackrabbit by default (other options such as a flat-file storage may be made available in the future).

  • The search interface provide now the capability to search on OSGI metadata (based on the update of the Apache Maven Indexer library).

  • You can now download Maven index content from remote repositories to include artifacts which are not present locally in your search results



Full release notes available here: http://archiva.apache.org/docs/1.4-M1/release-notes.html

Download page: http://archiva.apache.org/download.html

Have Fun and some nice new features will come soon :-)

Apache Archiva, Archiva, Apache Maven, Maven, Apache are trademarks of The Apache Software Foundation.


Categories: Olivier Lamy

Pages

Subscribe to Talend Community Coders aggregator - Olivier Lamy