I'm trying to achieve better integration into VSCode with my project
archetype. The way that the VSCode maven extension seems to prefer to work
is for users to explicitly "run" a goal from a plugin of the project.

You can see the VSCode instructions for running a JavaFX app as an example
here:
https://code.visualstudio.com/docs/java/java-gui#_run-the-javafx-application

Basically, the user expands the Maven > Project > Plugins > JavaFX node,
then right clicks the "javafx:run" goal, which is defined in the JavaFX
maven plugin.

In the JavaFX example, that javafx:run goal actually spawns a new process
that runs the app, which seems to break debugging.

With my own projects, I generally bind my "Run" goal to the "verify" phase
so that running "mvn verify" will run my project.  This work OK in IntelliJ
and NetBeans (although I need to do some contortions to make debugging
work), but doesn't seem to mesh with VScode's way of doing things.

What I would like is to create a custom "run" goal in my plugin so that
VSCode can run or debug this goal - and the goal should trigger everything
up to the "verify" lifecycle - without having to spawn a new process.

I've been hitting walls in maven for years now, and I have a feeling that
this is not possible.  Can someone either set me straight (i.e. inform me
that it is possible), or confirm that, indeed, it is not possible?

Thanks

Steve

-- 
Steve Hannah
Web Lite Solutions Corp.

Reply via email to