You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

DRAFT

Micronaut applications can be run in automatic restart mode. In this mode, a change to a project source will trigger

  • compilation
  • packaging
  • application restart

This run mode is not suitable for debugging, as the developer routinely modifies the underlying source, and (seemingly random) restarts would break the debugging context. There still needs to be a "traditional" run mode for work scenarios, where (random) restarts implied by source changes could be harmful, e.g. when the worked-on app maintains some connections to other services, or keeps some context.

The actual implementation should be always delegated to the underlying build/launch system.

  • gradle supports continous build mode with -t parameter to the gradle launcher
  • maven is extended by micronaut plugin and goal mn:run to do the same

Project Action

A new project action Continuous Run will be defined to handle this special action. Both Maven and Gradle project support action configuration mapping, so implementation in both Gradle and Maven will just provide an action mapping for the new project action. The project action itself should be defined in

  • Gradle Projects module: as -t is a Gradle feature, this will enable its use in other Gradle projects, not just Micronaut.
  • Micronaut module (for Maven): Maven does not support it itself, but Micronaut's plugin does. Possibly, to reduce dependencies, micronaut.maven bridge module could be created.

This Project Action can be then invoked programmatically, apart from the project UI itself, by a LSP client, too.

Display Action in the UI

Neither Gradle or Maven support adding technology-specific actions in the project UI.

  • No labels