如何使用Maven的archetype快速生成一个新项目
Maven的archetype Plugin可能大家都听过,但不一定都能很好地用好它。缺省地如果你使用
mvn archetype:generate
会从maven的Repository里查找所有支持的arche types,大概有500~600个。正因为是太多了,所以查找起来很是不方便。
其实平时常用的arche type也就那么几个。像我会用到的:
1.simple start
2. web app
3. Groovy basic
很自然的就会考虑,是不是能什么简便的方法只需要从这3个组成的list里选择就可以了。 答案当然是: Yes
实现步骤如下:(本机的Maven Repository目录在C:Usersuha.m2 )
1. 使用mvn archetype:crawl 命令,它会在 C:Usersuha.m2 epository目录下生成一个archetype-catalog.xml文件
2.将archetype-catalog.xml移到上一层目录,也就是C:Usersuha.m2
3.这时再运行mvn archetype:generate -DarchetypeCatalog=local 就可以达到你想要的目的了。
是不是很方便啊。
想得到更全的archtetype-catalog.xml 可以访问: http://repo1.maven.org/maven2/archetype-catalog.xml
Codeforces 842B
CodeForces
CodeForces 359A Table
Find them, Catch them POJ
剪花布条 HDU
关于map的学习笔记
ASP.NET MVC 中将数据从View传递到控制器中的三种方法(表单数据绑定)
SQL Delta实用案例介绍 (对应软件)
SQL Select count(*)和Count(1)的区别和执行方式及SQL性能优化
- 最新文章
-
Codeforces 219E Parking Lot 线段树
Codeforces 1101F Trucks and Cities dp (看题解)
Codeforces 348D Turtles LGV
Codeforces 1136E Nastya Hasn't Written a Legend 线段树
Codeforces 1132E (看题解)
Codeforces 877F Ann and Books 莫队
mysql 如何将一个库的一个表的数据复制到另一个库中的一个表
解决Python 2下的json.loads()导致的unicode编码问题,json数据转换前面带u,去掉字典类型前面的u
vue基础 事件绑定
vue基础