Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Maven Archetype: is there a way to specify a default groupId

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

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

Thanks.

like image 814
kmansoor Avatar asked Oct 05 '22 00:10

kmansoor


1 Answers

You can do this by specifying a propertyFile

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

groupId=com.company

and to create the archetype

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

another example here

like image 57
ben75 Avatar answered Oct 10 '22 04:10

ben75