What's the difference between mvn archetype:generate and mvn archetype:create

巧了我就是萌 提交于 2020-01-01 07:51:10

问题


any difference between those two?


回答1:


archetype:create is the old and deprecated form that needed all properties defined upon start, while archetype:generate is the newer and more comfortable way. archetype:generate knows about those catalogs where archetypes are listed and can ask you for missing properties/variables.

I guess the reason for introducing a new command was that the new generate was not backward-compatible, so it might have broken existing scripts that rely on it.




回答2:


Check the documentation for archetype generate, create has been kept for backwards compatibility:

For backward compatibility with the Archetype Plugin version 1.0-alpha-7, we kept the old create goal which can be called using mvn archetype:create.

So create and generate will do the same thing but create has been deprecated so you should use the generate command instead.



来源:https://stackoverflow.com/questions/5209343/whats-the-difference-between-mvn-archetypegenerate-and-mvn-archetypecreate

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!