Thursday, July 28, 2011

First steps in maven - empty project

First way - iteractive
Go to the directory, where you want to place the folder of the new project (d:\projects)
mvn archetype:generate
Some output from maven show. We run the interaction version. Here are my answers to it:
Choose a number: 112:
Choose version:
1: 1.0-alpha-1
2: 1.0-alpha-2
3: 1.0-alpha-3
4: 1.0-alpha-4
5: 1.0
6: 1.1
Choose a number: 6: 5
Define value for property 'groupId': : com.YOUR_COMPANY.YOUR_PROJECT_PACKAGE
Define value for property 'artifactId': : PROJECT_NAME
Define value for property 'version':  1.0-SNAPSHOT: : PROJECT_VERSION
Define value for property 'package':  com.YOUR_COMPANY.YOUR_PROJECT_PACKAGE: :
Confirm properties configuration:
groupId: com.YOUR_COMPANY.YOUR_PROJECT_PACKAGE
artifactId: PROJECT_NAME
version: PROJECT_VERSION
package: com.sepbulgaria.eshop.messages
You are ready!

Second way - non-interactive

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -Dversion=1.0-SNAPSHOT -DinteractiveMode=false

No comments:

Post a Comment