开发者

Filter archetypes in Maven command line with archetype:generate

开发者 https://www.devze.com 2023-03-20 03:55 出处:网络
When trying to generate a Maven project from an archetype (using mvn archetype:generate), the command returns a lots of archetypes.

When trying to generate a Maven project from an archetype (using mvn archetype:generate), the command returns a lots of archetypes.

Is there a way to filter archetypes given a word (contained in g开发者_高级运维roupId or artifactId)?

I know you can actually create a project with a specific archetype, with arguments like -DgroupID=org.domain -DartifactId=sample, but it's not what I'm looking for.


Ok. A bug as been filed and should be resolved in Maven archetype plugin version 2.1.

Edit:

Bug is solved in maven-archetype-plugin version 2.1. Documentation is ready.

mvn archetype:generate -Dfilter=org.apache:struts

For a groupId containing org.apache AND an artifactId containing struts

0

精彩评论

暂无评论...
验证码 换一张
取 消