-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass environment Variables to MavenLauncher #4817
Comments
Probably not the best solution, but if they are present as environment variables, the spawned Setting that from inside your program is not really portable though. The maven launcher would need to expose an interface and use the |
Ah, I just thought of another slightly more realistic workaround: |
That's a really good idea, but for it, we need to beforehand identify either manually or by XML parser if this variable is not present in the properties, so for a single module it sounds okay but for a multi-modular project it sounds like a lot of work, is there a way we can automatically identify which variables are not present using any library? |
You need to know which environment variables need to be set in any case. I guess we could also add that to the MavenLauncher API, setting environment variables sounds useful enough. See #4830. |
The new API you want to look at is |
I have a project, where I am fetching code from a rep and then building a CtModel from it that repo.
Now in some project there are some environment variables in dependencies like -
Here, revision is that variable, now when building a model, spoon gives an error.
Is there a way I can pass this variable to Maven Launcher or any other work around.
The text was updated successfully, but these errors were encountered: