Java – what is the difference between Maven archetype mojo and Maven archetype plugin?

Run the output fragment a.txt of the command MVN archetype: generate >

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.)

Running the following command produces almost the same POM file and Java source class:

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

So what's the difference between Maven archetype mojo and Maven archetype plugin? Will any of these generate a sample plug-in project? Why do we both have?

Solution

No difference Maven mojo is a minimalist Maven plugin

I don't think we need both, just some chaos in Maven's world:)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>