Tuesday, June 09, 2015

Selectively run Maven phases and goals from Eclipse IDE

CALL FOR ACTION: If you like this feature please vote up on 470138.

Recent updates:

  • Single Selection Mode
  • Selecting a phase selects the associated goals
  • Expand all Phases
  • Expand all/Collapse all

When you run a phase, Maven runs all the preceding phases as per the lifecycle definition. However, sometimes I only want to run a selective subset of phases. The only way to do that is to actually run the goals associated with those phases explicitly. However how to get that list of goals? One would think that running:

> mvn help:describe -Dcmd=deploy

would do the trick. But alas it does not. It only lists the statically associated goals as per the static lifecycle definition - and not the actual goals you may configured in the pom's plugin configuration section. IMO this is simply - unimplemented yet useful functionality of Maven.

In this blog entry I talked about listing phases and actual associated goals of a maven lifecycle of a maven pom. In it I talked about an Eclipse plugin based on m2e code. I have improved it further. Now you can show the phases and goals in a checked tree dialog using the Project > Phases and Goals command.

You can run the selected phases or goals using the Launch selected goals command. When a phase is selected all goals associated with that phase are run. In Single Selection Mode the goals simply get added to the set in the order in which they were selected. This allows execution of orders in any order you want.

You can print the listing to the Maven Console using the Log All command.

To use
  • Make sure you have m2e plugins installed into your Eclipse.
  • Then install the fragement from this update site URL:

or use:

Drag to your running Eclipse workspace to install Phases and GOals


  • Restart Eclipse
  • Select a maven project node and invoke Project > Show Phases and Goals command. You will see the output like above in the Maven Console. If a resource from Maven Project is not selected you are prompted to select on.


BTW This is implemented as a fragment for https://github.com/eclipse/m2e-core/tree/master/org.eclipse.m2e.core.ui


Sunday, June 07, 2015

List Maven POMs phases and goals bounds to the phases

For longest time I have wanted to be able to show the actual goals associated with the phases of maven lifecycles. There is the following maven command:

> mvn -B help:describe -Dcmd=deploy

but alas it only lists the static set of goals associated with the phases as specified in the original lifecycle. And then it struck me that m2e add the Lifecycles section to the Maven project's properties page.

So I git cloned the m2e repo  https://git.eclipse.org/r/m2e/m2e-core , looked through the code and
the wrote a small Eclipse plugin fragment to add a command to list the phase and goals into the console. Here is the result.

To use
  • Make sure you have m2e plugins installed into your Eclipse.
  • Then install the fragement from this update site URL:
  • Restart Eclipse
  • Select a maven project node and invoke Project > Show Phases and Goals command. You will see the output like above in the Maven Console.

Now displays likely lifecycle and execution ids.

  • Show the output in a tree view.
  • Allow the user to launch mvn build with the goals associated with a phase.


Sunday, May 24, 2015

Monday, April 20, 2015

Question on KQED forum - Philosopher John Searle on 'Seeing Things As They Are'

I sent this question on KQED forum today - Philosopher John Searle on 'Seeing Things As They Are'.

Can John comment on the separation of subject and object of perception and the truth about respective things. I always find that people confuse between the two and think of truth of the subject is same as the truth of the object. For example:

  • When a person reports a spiritual experience there are two parts - the perception in their brain (subject) which in IMO is different from the object - the thing they experience i.e. spirit (say!). I think no one will/can deny that the truth of the persons inner experience but that does not mean the spirit is true.
  • Or when a person perceives the red pigment... (perception of) the color is really the property of brain of the person experiencing the red color. The emission or reflection of a particular frequency of light is the property of the pigment. So IMO when people like Dan Dennett claim that the Colors are real (in "what is real?" debates etc)...what they really mean is that the distinct perception of a particular frequency which the person has learned to call red is real. Not the color red itself.
It is easy to see how the exact same perception (for scenarios above) inside brains can be induced using other mechanism and it happens all the time...drugs or pressing on the eyeball - sometime you see red color.

Part of the question was read by Michael Krasny but unfortunately not the whole question. Granted that the question is long. But then John changed it to his own notions of "subjective visual perception" describing "objective visual perception" and so on and did not comment on my central point about separation of subject and object component of an experience.

I sent this email to Michael Krasny:

Kudos on great program. As always :)

Thanks for asking my question during the program. But it came across as opposite of what I was saying/asking because John answered it by saying something like (paraphrasing) "...when one describes the subjective visual field, one ends up describing objective visual field..." (or some such). However I was suggesting something exactly opposite. In certain cases the description is really the description of subjective perception and is different from the objective reality out there.

This is my pet objection to reports like this http://www.newsweek.com/proof-heaven-doctors-experience-afterlife-65327 in the Newsweek. Just because the doctor had a Afterlife experience (perception in his brain) does not mean Afterlife exists. It most likely was caused by traumatic state of his brain.And of course the fact that a doctor had that experience does not mean it is somehow MORE true. Sometimes this strategy is used to imply truth of something just because some person of good repute - say Einstein said it - well some times even Einstein has been wrong.

Awaiting his response.

The above has been my pet objection to articles like this.

You can hear the question followed by answer directly by matching the thumb with this red one:

Sunday, February 15, 2015

Single Devtools with all my enhancements

I have consolidated all my enhancements to Chrome Devtools into one.

DevTools app is featured at Showcase Chrome Debugging Protocol Clients

The URL for enhanced Chrome Devtools is:


which you need to load in DevTools app above. Please note that DevTools app is not essential to try out the enhanced version of Chrome Devtools but it sure makes it easy.

The enhancements are:

You need to enable experiments:

I have now made this the default Devtools URL in Chrome Devtools App.