创建Maven原型:是否可以指定默认的groupId [英] Creating Maven Archetype: is there a way to specify a default groupId

查看:421
本文介绍了创建Maven原型:是否可以指定默认的groupId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用create-from-project创建了一个Maven原型.有没有办法指定默认的groupId?

I have created a maven archetype using create-from-project. Is there a way to specify a default groupId?

此原型仅供内部使用,默认groupId将保存一些击键.

This archetype is for internal use only, default groupId would save some keystrokes.

谢谢.

推荐答案

您可以通过指定

You can do this by specifying a propertyFile

此属性文件可能包含一些属性,包括默认的groupId.像这样(在名为something.properties的文件中):

This property file may contains few properties including default groupId. So something like this (in a file named something.properties):

groupId=com.company

并创建原型

mvn archetype:create-from-project -Darchetype.properties=../something.properties

另一个示例此处

这篇关于创建Maven原型:是否可以指定默认的groupId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆