4

I am trying to recreate an Eclipse Run Configuration for Maven.

I have added the environment variables in launch.json:

"env": {"environment":"test", "applicationname":"asset-misc-api", "log_level":"debug","spicode":"SIKS","userid":"BB3820"}

The app recognizes the variables when I run it via the Spring Boot dashboard.

But when I instead run the app using a custom Maven goal, the environment variables are no longer passed to the app.

How can I ensure that the Visual Studio Code configuration is equivalent to my Eclipse Run Configuration as depicted in the images linked?

Maven goal: Maven goal

Environment variables: Environment variables

  • 1
    This is really frustrating. I've added env via launch.json and even maven.terminal.customEnv via settings.json and nothing seems to get read. – Mr Moose Sep 17 '19 at 20:04
  • 1
    I have the same problem too. How to configure the environment variables in visual code as it is done in Eclipse (Spring Tool Suite) – configbug Sep 25 '19 at 15:24
  • Did you ever get this figured out? – Andrew Nov 04 '22 at 15:02

0 Answers0