码迷,mamicode.com
首页 > 编程语言 > 详细

Using Maven to generate a Java Project or Web project

时间:2014-11-01 17:35:22      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   ar   java   for   sp   

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 should 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 could go to "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

bubuko.com,布布扣

then click the "Enter" to run command

bubuko.com,布布扣

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

bubuko.com,布布扣

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

bubuko.com,布布扣

 

E | hongtenzone@foxmail.com  B | http://www.cnblogs.com/hongten

========================================================

Using Maven to generate a Java Project or Web project

标签:style   blog   http   io   color   ar   java   for   sp   

原文地址:http://www.cnblogs.com/hongten/p/hongten_maven_generate_project.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!