ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
MIT License
548 stars 129 forks source link

Environment variable does get resolves in 'VM Options' in 'Configuration' #84

Open dhruv-bansal opened 5 years ago

dhruv-bansal commented 5 years ago

Defined variable in file DATASOURCE_CONF=-Dspring.datasource.url=jdbc:mysql://localhost:3306/TEST_DATABASE -Dspring.datasource.username=test -Dspring.datasource.password=test -Dhibernate.dialect=org.hibernate.dialect.MySQLDialect

added file in configuration image

This variable is not getting resolved in VM Options image

ashald commented 5 years ago

Does it work if you set environment variables via native IDE UI in the Configuration tab?

I'm afraid it might be a limitation that we cannot do anything about in the same way as it was in https://github.com/ashald/EnvFile/issues/78#issuecomment-486115324.

If I had to offer an alternative, I'd suggest trying setting those values via JAVA_OPTS environment variable.

dhruv-bansal commented 5 years ago

Yes, it worked very well after declaring into "Environment variables" in the "Configuration tab". I just have to change ${DATASOURCE_CONF} to $DATASOURCE_CONF$ In my point of view, EnvFile should act as a Decorator over the "Environment Variables" functionality. Everything offered by "Environment variables" plus the additional feature of easily managing variable via file etc. @ashald What do you think?

ashald commented 5 years ago

I think that's a great idea but unfortunately that is not something that is possible to implement with current APIs exposed by JetBrains IDEs. 😞