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

System properties should take precedence over arquillian.xml #41

Open
bartoszmajsak opened this issue Sep 28, 2016 · 5 comments
Open

System properties should take precedence over arquillian.xml #41

bartoszmajsak opened this issue Sep 28, 2016 · 5 comments

Comments

@bartoszmajsak
Copy link
Member

When, for example, username and password for JIRA are defined in arquillian.xml but also provided as environment variable, latter should take precedence.

Current implementation takes only those which are defined in the file.

@MatousJobanek
Copy link

You basically expect the completely opposite behaviour that is currently implemented in Governor - the current implementation ignores values that are set as system properties when the values are set in arq.xml and you want to do it the other way around... To be honest I would choose you approach as well, as it is also implemented in arq-core: https://github.com/arquillian/arquillian-core/blob/master/config/impl-base/src/main/java/org/jboss/arquillian/config/impl/extension/PropertiesParser.java
So I'm very interested why it was done in this way - was there any good reason for it? Could you please shed some light on this @smiklosovic

@bartoszmajsak
Copy link
Member Author

That's correct. I think that's what you should generally expect when it comes to precedence. System properties take precedence over locally defined ones (e.g. mvn).

@smiklosovic
Copy link
Member

yeah why not :)

what about environment properties?

@bartoszmajsak
Copy link
Member Author

This can be always solved in arq.xml

Maybe we should remove those additional ones and just rely on what is available from core?

@bartoszmajsak
Copy link
Member Author

I think we should have following strategy:

  • properties in arquillian.xml
  • overwrite if their Governor counter parts defined as env / system properties

I wouldn't remove "counter parts" as they are already introduced and it would be confusing for the user.

By counterparts I mean for example redmine.governor.server (used in arquillian.xml as server under configuration for redmine).

And we can always use regular substitution provided by Arquillian Core: ${property_name:default_value}.

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

No branches or pull requests

3 participants