-
Notifications
You must be signed in to change notification settings - Fork 881
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
Passthrough additional environment variables #214
Conversation
+1 |
Squashed, rebased version of eirslett#214
+1 This would be very useful. |
I've ported this forward to current master. I'd really appreciate feedback. |
The advice I have given so far (in other issues buried deeeeeep down in the github issues list) is to pass on variables as flags:
and that might seem like a stupid solution at first, but it's actually pretty nice, since you can then run your frontend build independent of whatever you do in Maven. That's a huge win for frontend developers. You don't have to wait 3 minutes for the Java classes to compile and the unit tests to be run, in order to debug the gulp build. |
I will (again) hold against that recommendation that it requires extreme care with quoting arguments. From what I read in My use case would put an output directory there, which very well could contain spaces. Secondly, relying on environment variables doesn't restrict independence of the build either:
works just the same from the command line. |
+1 I would appreciate this to be included also. I opted to the maven-exec-plugin for a current use case i am working on because of unavailability to tweak a bit the runtime environment variables here. |
+1 I see real cases when I need to tweak som npm/boer configuration, not everything can be done by parameters |
Ok, let's get this merged in! :-) |
Passthrough additional environment variables (by l337r007) merge on top of master
This was fixed in #346 :) |
This PR allows all Mojos to pass through additional environment variables to the build, accessible there through
process.env
.This is a relatively quick and convenient way to transport (e.g.) Maven properties into the Node world, which is what I would be using it for.
It would also fix #158.