Skip to content
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

Env variables from Maven properties overwrite generated keystore password #1096

Closed
scottkurz opened this issue Feb 24, 2021 · 0 comments · Fixed by #1097
Closed

Env variables from Maven properties overwrite generated keystore password #1096

scottkurz opened this issue Feb 24, 2021 · 0 comments · Fixed by #1097

Comments

@scottkurz
Copy link
Member

scottkurz commented Feb 24, 2021

It seems wrong that using a property like -Dliberty.env.xyz=123 overwrites the keystore password generated into server.env, by default.

This isn't a new problem and we've already worked out a solution: #648.
But the use of the mergeServerEnv=true parameter requires a more advanced user who reads the plugin doc.

Let me propose taking another pass at this. What if we said:

DESIGN

IF
(mergeServerEnv=false AND Env Maven Props exist AND (there's neither server.env in configDirectory NOR a serverEnvFile parm)
THEN we merge special properties (of now, just one, "keystore_password") from the target/install server.env into the maven env props that we're going to write, preferring a property in maven env props if there is one.

Yes.. we lose symmetry by special casing one variable..but it seems important enough to justify IMHO.

I thought about just issuing a warning but it seems like you'd have to go through some trouble to read server.env every time to determine if this case needs a warning or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant