Skip to content

Java properties are not set with -Dkey=value #5209

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

Open
lolgab opened this issue May 27, 2025 · 3 comments
Open

Java properties are not set with -Dkey=value #5209

lolgab opened this issue May 27, 2025 · 3 comments
Labels
bug The issue represents an bug workaround-available

Comments

@lolgab
Copy link
Member

lolgab commented May 27, 2025

In Mill 1.0.0-RC1 if you do mill -Dmyprop=value the property is not set correctly.

//| mill-version: 1.0.0-RC1

println("ivy.home = " + sys.props.get("ivy.home"))

prints:

ivy.home = None
@lolgab lolgab added the bug The issue represents an bug label May 27, 2025
@lolgab
Copy link
Member Author

lolgab commented May 27, 2025

The syntax is not normal Java syntax but like a Mill command line argument.
mill -D myprop=value or mill --define myprop=value works.

@lefou
Copy link
Member

lefou commented May 27, 2025

The syntax is not normal Java syntax but like a Mill command line argument. mill -D myprop=value or mill --define myprop=value works.

mill -Dprop=1 should also work in newer Mill versions.

@lihaoyi
Copy link
Member

lihaoyi commented May 28, 2025

@lolgab I put together an integration test, -Dprop=value seems to work correctly at least in the test #5212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue represents an bug workaround-available
Projects
None yet
Development

No branches or pull requests

3 participants