One of the wizards on the Maven mailing list pointed me to a complete working example that does exactly what I wanted: it creates a custom lifecycle with phases named whatever you want, and lets you use that lifecycle from the maven command-line. The example is at:
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-scm-publish-plugin
The key missing insight is that the components.xml file must have both a LifecycleMapping component and a Lifecycle component. The correct, working components.xml is below.
Note that you may only define an additional lifecycle (i.e. additional to the three default lifecycles: the build, clean and site lifecycles). The original lifecycles and their phases will always be present and you cannot include any phases with names that match an existing lifecycle in your new lifecycle, which is too bad, since it makes it more awkward to redefine a complete lifecycle for a project. Still, this is a nice step forward.
Also, remember that when you use the new lifecycle, you must mark it as an extension:
<extensions>true</extensions>
so the plugin is allowed to redefine the lifecycle. To indicate that your pom.xml should use the new lifecycle, include the lifecycle name as the "packaging" for your project.
<component-set>
<components>
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>lenskit</role-hint>
<implementation>
org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
</implementation>
</component>
<component>
<role>org.apache.maven.lifecycle.Lifecycle</role>
<implementation>org.apache.maven.lifecycle.Lifecycle</implementation>
<role-hint>lenskit</role-hint>
<configuration>
<id>lenskit</id>
<phases>
<phase>get-data</phase>
<phase>analyze</phase>
<phase>eval</phase>
</phases>
<default-phases>
<get-data>org.riedl:hello-lenskit-plugin:greet</get-data>
<analyze>org.riedl:hello-lenskit-plugin:greet</analyze>
<eval>org.riedl:hello-lenskit-plugin:greet</eval>
</default-phases>
</configuration>
</component>
</components>
</component-set>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…