Using Maven to generate a Java Project or Web project, mavengenerate

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.