Maven:lifecycle.xml 还是 lifecycles.xml?

Maven: lifecycle.xml or lifecycles.xml?

我对 Maven 文档有点困惑 - 生命周期应该在 lifecycles.xml 还是 lifecycle.xml 中定义?就连 Sonatype 参考资料也似乎可以互换地谈论这两个名称!

仍然对 components.xml 感到困惑 - 如果有任何好的参考,您可以 post 吗?

谢谢, -戴夫

应该是lifecycle.xml(见Lifecycle Mappings):

Configuration of custom lifecycle mappings for the plugin, as generally stored in META-INF/maven/lifecycle.xml in a plugin's jar artifact.

lifecycles.xml,带有 's',显示为 only once in the Maven source, commented out 一个独特且从未使用过的文件。

此外,components.xml,如 Overriding the Default Lifecycle:

In your plugin project, create a META-INF/plexus/components.xml under src/main/resources.

有关完整示例,请参阅 Creating a new phase