Skip to main content

Maven: Jump Start

Posted by schaefa on November 30, 2004 at 3:02 PM PST

I started to love Maven not only for its scripting abilities but also for the fact that one could start a simple project in a few minutes which is even faster than to build a project with shell scripts. So if you are in doubt about Java just create a simple Maven project and test it with life code. Quit often this approach is even faster than add logging statements in your project or using a debugger.

Now during the creation of my upcoming Maven presentation @ LA Jug I discovered a way to create a project in seconds rather than minutes. Here is how to do it:

  1. Open a console and go to the directory where your project should be placed in
  2. Enter 'maven genapp' and hit enter
  3. Select the template (if in doubt then just hit enter to use the default template)
  4. Enter the application id which will become the first part of the application archive
  5. Enter a human readable Name for you project
  6. Enter the package for your source code like 'org.test.myapp'

After entering all the requested data it will create the Project Object Model (project.xml), project properties and the directory structure for the source and test code as well as some sample classes (Hello World).

Long life laziness

Related Topics >>