I perfectly understand that when the user invokes maven with a phase name, as it stands today, all the preceding phases are run. It is also true that you can invoke a single goal by specifying it. You can specify multiple goals also. With the new syntax of being able to pass the execution id along with the goal you can also run non default-* it is basically possible to run any specific goal. (See:
https://issues.apache.org/jira/browse/MNG-5768 as implemented in
Maven 3.3.1.
I think you may agree that a single goal execution is basically random-access. What I am proposing is simply a shortcut, self maintaining way to invoke each of these goals by simply specifying the phases. The phases of a lifecycle are more stable. Goals generally are configured in poms and are thus may change over time.
Granted, this may not work for users 100% of the time but when it works it is useful IMO.
I had mentioned in one of the previous blog entries that I was in-fact inspired by the Lifecycle mapping functionality of M2E.
I also agree that this belongs may be at the maven level via some modified/extended syntax of maven CLI. However when I attempted to enhance the
> mvn help:describe --Dcmd=somephase
I did not get far. So I was able to put this together with M2E fragment - based on the code I saw in Life Cycle Mapping property page in M2E. This renders the use of my fragment to interactive use for now.
It is possible that this idea is too radical for M2E or maven community in which case it will have a deserved rejection in the marketplace of ideas :)
I will update my blog entry and the bugzilla to explain the thinking behind this better.
Hope this clarifies where I am coming from at this.
Cheers,
Sandip