Posts tagged archetype


The “Frozen Zone” was still On, so I had lot of time to contribute to Open Source project – in my case Apache Struts. I’ve been working for few weeks with Maven 2 archetypes, to updated them to latest Strust 2 version. It was quite easy task, I even wrote a simple bash script for automatically testing them.

Nevertheless, became the time when I had to release them – or to be more precise – prepare staging release. I never had been doing that, so always is the first time 😀

I’ve read some tutorials about releasing projects with Maven and there is also a great documentation entry on Apache Struts site about releasing the project. It was the most helpful information. Equipped with knowledge I started the release process. The first three archetypes were released very fast and without any problems (except conflict between Cygwin and Subversion client – next time I will use Linux box 😉 ).

Yap, I thought I’m on the road and then I got problem with checking out tagged project from Subversion. I don’t remember what was the message, but I spent more than hour to solve that problem! Another experience for future.

The whole release process took mi around 5-6 hours so it was enormous achievement in my opinion. The next time it will be faster 😉 And the last thing – the Vote! I started it and was able to relax with cold beer 😀

community day

I spent the whole day working with Apache Struts 2 Maven archetypes – it’s an open source project hosted at – basically Action Base Java Web framework.

During that I discovered strange Maven behaviour – when I lunched it with -o option (work in offline mode) it wasn’t be able to find installed archetypes. To clarify – I prepared a script that will build up the archetype from source code, install it in my local Maven repository, then create basic application base on that archetype and lunch them, the source is below:

if [ -e demo ] ; then
    rm -R demo
cd $1
mvn clean install
cd ..
mvn -o archetype:generate -DgroupId=org.demo
    -DartifactId=demo -Dversion=1.0-SNAPSHOT
    -DarchetypeGroupId=org.apache.struts -DarchetypeVersion=2.1.8
cd demo
mvn jetty:run
cd ..

$1 – it’s a command line parameter specifying archetype folder which is also archetype name

So it shouldn’t be needed to access remote archetype repository to download archetype – it’s already in local repository! I tried that with different Maven versions – the latest 2.2.1 and with 2.0.10 – with both was the same.

After some time and many experiments I found the solution – do not use -o option used -B instead! And that I was able to test one archetype – another 3 are waiting!

Go to Top