Using Maven to generate a Java Project or Web project, mavengenerate
I often to generate a Java project or Web project with Eclipse tool. well, I have no idea when I want to generate a Java project or Web project with the command window in the Windows 7. so, I think I need to record how to generate a Java project or Web project with the command window in the Windows 7.
En, you shocould install the Maven in your computer before you want to generate a project. and if you have no idea how to install Maven in your computer, you cocould go"Install the Maven in your computer"To see more information about how to install the Maven in your computer.
Now, Using the below command to generate a Java project:
F:\maven>mvn archetype:generate -DgroupId=com.b510.shopping -DartifactId=shoppin-core -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Then click the "Enter" to run command
You can see the "build success", It means that you had generated a Java project just now.
Now, Using below command to generate a Web project:
F:\maven>mvn archetype:generate -DgroupId=com.b510.shopping -DartifactId=shopping-core -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
The different between in generating a Java project and a Web project with command window in the Windows 7:
-DarchetypeArtifactId=maven-archetype-quickstart --> For Java Project-DarchetypeArtifactId=maven-archetype-webapp --> For Web Project
========================================================== ======================
More reading, and english is important.
I'm Hongten
E | hongtenzone@foxmail.com B | http://www.cnblogs.com/hongten
========================================================== ======================
How can I convert my eclipse web project to a maven project?
This is a maven project. Otherwise, you cannot use the mvn eclipse: myeclipse command. This command only converts the maven project into a project that can be imported in myeclipse.
How can I create a project similar to the optional maven support project in eclipse in spring?
Springsource is only a plug-in eclipse. To create a web project, you must create a web project under eclipse. eclipse is the real development tool. I suggest you use the myEclipse for spring tool to create a project, because myEclipse for spring is a complete development tool integrating eclipse and springsource.
The procedure is: [new]-> [Project]-> [Web Project]. All springsources are automatically loaded in the created Project. Easy to use.
It doesn't matter if you don't use the myEclipse tool, because the teacher won't specifically demand what development tools you must use. As long as you can make things, it is a good result for the teacher.