-
Notifications
You must be signed in to change notification settings - Fork 99
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
No way to pass command line arguments to lein ring server
not the generated jar
#172
Comments
Sorry, but I'm not clear what you expect this to do. What does |
I expect extra command-line parameters to be ignored by For example:
Or:
Maybe there's a better clojury way to do this but what can replace command-line arguments? |
I think the problem is that if we go this route, we lose the ability to have arguments specific to the plugin. You could write your own |
Environment variables have their own issues. Mostly, they are implicit and slightly clumsy. That's a philosophical dispute. Writing my own Regarding losing ability to use command-line options with lein-ring, I think this is a solved problem and typically You can close it if you find argument passing unnecessary. Use your judgement. |
A Though I don't see a big difference between:
And:
|
@not-raspberry , can you share more details on how you wrote/specified your own
To explain further, I want to do something like:
So that whoever has the uberjar can specify their own port when running it. |
Add
to |
Alright, I think I got it! Thanks a bunch. Important to note that |
Coming in on this late. My Smeagol app reads a configuration file all of whose entries can be overridden by environment variables, but you have to set an environment variable to indicate where the configuration file is. Feedback from users is, Windows users typically don't know how to set an environment variable, so I'd like the jar to accept one argument, a path to a configuration file. This would allow the user to double-click on the configuration file and then select the jar from the Of course I could create a batch file which takes one argument, sets |
OK, looking at the source, there is a means of overriding main:
So we can set the
This means we can in fact define our own It turns out that the default
So the default is to invoke I'm working out how to do this and will document it in this thread. |
Extra command-line arguments trigger errors:
Same happens with generated uberjars:
Is it possible to allow the use of traditional command-line flags?
The text was updated successfully, but these errors were encountered: