前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >maven的hello word

maven的hello word

作者头像
东营浪人
发布2019-09-05 17:57:59
4540
发布2019-09-05 17:57:59
举报
文章被收录于专栏:浪人聊编程浪人聊编程

maven目录结构

src/main/java

Application/Library sources

src/main/resources

Application/Library resources

src/main/filters

Resource filter files

src/main/webapp

Web application sources

src/test/java

Test sources

src/test/resources

Test resources

src/test/filters

Test resource filter files

src/it

Integration Tests (primarily for plugins)

src/assembly

Assembly descriptors

src/site

Site

LICENSE.txt

Project's license

NOTICE.txt

Notices and attributions required by libraries that the project depends on

README.txt

Project's readme

创建标准目录模板

代码语言:javascript
复制
mvn archetype:generate -DgroupId=net.yun10000.test -DartifactId=maven-helloword -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -DpackageName=net.yun10000.test.maven.helloword

如创建web项目

代码语言:javascript
复制
mvn archetype:generate -DgroupId=net.yun10000.test -DartifactId=maven-helloword-web -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false -DpackageName=net.yun10000.test.maven.helloword

常用命令:

  1. 编译源代码 mvn compile
  2. 清空 mvn clean
  3. 测试 mvn test
  4. 安装当前工程到仓库 mvn install
  5. 打包 mvn package
  6. 生成eclipse项目
代码语言:javascript
复制
mvn eclipse:eclipse

指定jdk版本

代码语言:javascript
复制
<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version><!--$NO-MVN-MAN-VER$-->
				<configuration>
					<encoding>UTF-8</encoding>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档