>
> The Maven build lifecycle consists of phases [0] and you can bind plugin
> goals to phases. As far as I know it doesn’t work the other way around, so
> you can’t make a plugin goal execute particular phases, which seems to be
> what you’re asking. It should be the other way around: you can associate a
> plugin goal with a phase and then when you execute that phase all previous
> phases will have been executed, and your plugin goal will be executed. I
> don’t use VSCode for Maven projects, but I hope it lets you trigger a phase
> instead of a goal? I know at least IntelliJ IDEA (which I use) supports
> this.
>

This is how I have understood it also.  VSCode does let you execute phases,
but the "phase" model doesn't work well when you are working on
desktop application.  You expect there to be an action to "run" the app and
a separate action to "build" the app.    Neither of those are in the
lifecycle.  What I typically do is bind the "run" to the lifecycle so that
it will happen if I do `mvn verify`.   In IntelliJ I solve this problem
using different run profiles where I define custom maven commands
(including activation of profiles) that need to be run.  In netbeans, it
allows you to bind custom maven commands to debug, run, build, and test.
VScode, however, seems to want you to directly run a goal defined in a
plugin of the project for custom run configuration, and debugging.

Anyways, I have made some good initial progress on the tool to generate
this IDE integration for maven projects
https://github.com/shannah/mvnconfig

It will generate the Netbeans actions config, IntelliJ Run configurations,
and VSCode "favourites" using a simple platform-agnostic config file.

I haven't yet solved the problem of providing a custom command for
debugging, as VSCode doesn't seem to have an option for debugging
"favorite" commands.

Steve


>
> Nils.
>
> [0]
> https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

-- 
Steve Hannah
Web Lite Solutions Corp.

Reply via email to