Languages
 
 
 
 
Navigation
 
 
 
 
 
 

New project with maven2. Part 2 (wizard)


  Tagged

As was discussed in one previous post I have changed the script which became a wizard. This improvement makes the application generation process easier for the user. It also provided additionally functionality.

After answering on several questions and specifying a required type of application a project will be generated. Just run Eclipse IDE and import it into your workspace.

Let's look at the demo:

kobas-computer:~/Projects koba$ ./new_project.sh 
Building new Maven project
Please define project name [default: yourProjectName] : testapp 
Project name will be 'testapp'
Please define goupId [default: com.kobyleha.testapp] : 
Please define artifactId [default: testapp] : 
1. maven-archetype-quickstart
2. maven-archetype-webapp
3. other
Please select archetypeArtifactId choice [1 - 3] : 1
maven-archetype-quickstart will be used
...

As the result you have the 'tesapp' folder. You could find the project model file (pom.xml) inside this folder. It will be like this one:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.kobyleha.testapp</groupId>
  <artifactId>testapp</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>testapp</name>
  <url>http://maven.apache.org</url>

And again I have some ideas how to improve the current script:

  • Replace shell script with maven plugin
  • List of available archetypes that will generated in real time.
AttachmentSize
new_project.sh.txt1.89 KB

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

 
 
 
 
 
 
  • hooligan
  • cupuyc
  • ESoImk
  • LeKz
  • Anton
 
 
 
© 2006-2008 kobyleha.com