If you just use an IDE to generate Maven project, you can be familiar with default project structure of Maven:
Let's consider an example using it to create a "todo-list" project which contains 2 sub-projects: todo-core and todo-web
cd workspace
mkdir -p todo-list
cd todo-list
mkdir -p todo-list
cd todo-list
Old-fashioned way:
mvn archetype:create -DartifactId=todo-core -DgroupId=org.vnoss
mvn archetype:create -DartifactId=todo-web -DgroupId=org.vnoss -DarchetypeArtifactId=maven-archetype-webapp
mvn archetype:create -DartifactId=todo-web -DgroupId=org.vnoss -DarchetypeArtifactId=maven-archetype-webapp
New way:
mvn archetype:generate
mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp
mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp
Now we can edit the pom.xml to get desired result.
No comments:
Post a Comment