ITeye博客

maven 初始化项目

dbp_cn · 2018-09-26 11:43 · 项目构建部署 · 开源软件 · Markdown

新建工程:

# Maven 使用原型(Archetype)概念为用户提供了大量不同类型的工程模版(614 个)。
# 创建简单 java 项目
mvn archetype:generate

mvn archetype:generate \
-DgroupId=org.darebeat \
-DartifactId=HelloWorld \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DarchetypeCatalog=local \
-DinteractiveMode=false

# 创建 Web 应用
mvn archetype:generate \
-DgroupId=org.darebeat \
-DartifactId=HelloWorld \
-DarchetypeArtifactId=maven-archetype-webapp \
-DarchetypeCatalog=local \
-DinteractiveMode=false
作者:darebeat
链接:https://www.jianshu.com/p/20f01ceea21d
來源:简书

  打包:

# 1.清理目标目录(clean)
# 2.打包工程构建的输出为 jar(package)文件
# 3.测试报告存放在 maven\target\surefire-reports 文件夹中
# 4.打包好的 jar 文件在 consumerBanking\target 中
cd maven
mvn clean package

作者:darebeat
链接:https://www.jianshu.com/p/20f01ceea21d
來源:简书

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。