Introduction

Please note that this page will not give you introduction about Maven or how to use maven. There are many other tutorials available on the web which does this better. Here the discussion will be specific to using Celeritas Maven Archetype which will help you create a celeritas based project in a faster safer manner. Archetype version will be same as celeritas version to maintain consistency and too distribute the appropriate archetype with celeritas.

Installing Archetype

Till celeritas get due recognition, this archetype will not be hosted in public Maven repository. So you need to install it manually in order to use it. Its not tough to do that with Maven here is an easy step for you. Unzip celeritas-xxx.zip in a local folder and goto command prompt and execute the following command with the proper folder path of the archetype jar. Please make sure you change value of -Dfile to match the exact path where you have unzipped the file. -Dversion to the exact version of the downloaded jar.
                    mvn install:install-file -Dfile=celeritas-archetype-xxx.jar \
                         -DgroupId=com.rc.celeritas \
                         -DartifactId=celeritas-archetype \
                         -Dversion=0.1 \
                         -Dpackaging=jar
                

Using Archetype

Using Archetype is pretty simple. [Please install the celeritas-xxx.jar in your local maven repository before using the Archetype. See Install Celeritas in Maven Repository for details on this operation]. Just execute the following command in the root folder where you want to place the sources of your generated project [Don't worry you can simply copy and move this folder later as well]. Please change the value of -Dversion to use the latest celeritas version installed in the repository.
                    mvn archetype:generate -DarchetypeGroupId=com.rc.celeritas \
                        -DarchetypeArtifactId=cereritas-archetype \
                        -DarchetypeVersion=0.2 -DgroupId=com.rc \
                        -DartifactId=testceleritas \
                        -Dpackage=com.rc.testceleritas \
                        -Dversion=1.0-SNAPSHOT
                
Press enter if asked to confirm the default values. Type 'N' and enter to change the values.

Ads

Your Ad Here