Coding Katas with Maven

April 15th, 2010 by

Searching for nice coding kata sites I found this one – codingkata.org – I really liked because of the quick start and nice maven integration.

Just head over to the kata overview select the kata you wish to try out, copy the generated maven command line option and run it in the console – heres the code for the hello-world sample:

 

Coding Katas from Maven Archetype

mvn archetype:generate -DinteractiveMode=false -DarchetypeRepository=http://www.codingkata.org/repo/release -DarchetypeGroupId=org.codingkata.template -DarchetypeArtifactId=solv-java-archetype -DarchetypeVersion=1.04 -DgroupId=org.codingkata.unit -DartifactId=hello-world-solv-java -DkataId=hello-world -DkataVersion=1.02 -DlangVersion=1.6 -DlibVersion=1.3.2 -Dversion=1271358773

Now read what’s the problem to be solved, implement your solution and run the following command

mvn clean install

If your solution is correct – you should get some output like this:

========================= DEBUG OUTPUT START ===============================
========================== DEBUG OUTPUT END ================================
 
############################################################################
#############               _ _           _        _           #############
#############    __ ___  __| (_)_ _  __ _| |____ _| |_ __ _    #############
#############   / _/ _ \/ _` | | ' \/ _` | / / _` |  _/ _` |   #############
#############   \__\___/\__,_|_|_||_\__, |_\_\__,_|\__\__,_|   #############
#############                       |___/                      #############
#############                                 CODINGKATA.ORG   #############
############################################################################
#                                                                          #
# Kata solved.                                                             #
# Well done, kohai!                                                        #
#                                                                          #
############################################################################
 
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.355 sec

Resources

Article Updates

  • 2015-03-03: Table of contents and headings added.

    Tags: , , , ,

    Search
    Tags
    Categories