运行命令mvn archetype:generate>的输出片段A.TXT:
332: remote -> org.apache.maven.archetypes:maven-archetype-mojo (An archetype which contains a sample a sample Maven plugin.) 333: remote -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app-plugin -DarchetypeArtifactId=maven-archetype-plugin -DinteractiveMode=false mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app-mojo -DarchetypeArtifactId=maven-archetype-mojo -DinteractiveMode=false
那么maven-archetype-mojo和maven-archetype-plugin有什么区别?这些中的任何一个都会生成一个示例插件项目吗?为什么我们两个都有?
解决方法
没有区别. Maven Mojo是一款极简Maven插件.
What is a Mojo? A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven,and a plugin is a distribution of one or more related mojos.
我想我们不需要两者,只是Maven世界中的一些混乱:)