danwatford commented on pull request #246: URL: https://github.com/apache/ofbiz-framework/pull/246#issuecomment-736348137
Hi @mbrohl I agree that we could provide a lot of database configuration via properties. Properties can be set in gradle.properties, via environment variables and on the gradlew commandline so there are lots of possibilities for production of pre-configured builds. For this PR I had intended to set the database username and password through properties and amend entityengine.xml accordingly, but ran into some issues where groovy had parsed those xml attributes as read-only, preventing me from updating them. My limited knowledge of groovy and XmlParser was probably the cause, but after losing several hours to something which should be simple I thought I'd better submit what I had so far and see if anyone else might be able to help. There are lots of things we could do to configure database access through build-time properties and amend entityengine.xml, but I didn't want to spend longer on it without some community buy-in to the idea. Regarding driver versioning, I liked the idea of a top-level property where the user choses their DBMS which then drives an opinionated selection of the driver version. Of course we would still honour the user's version preference if they give one, but if the user later requested support for database connectivity issues we would suggest they use the version recommended by the build system. If the approach is acceptable we can get these changes into trunk where I and others can iterate to improve and clean up the build script to incorporate properties deemed useful. I'd like to avoid trying to do too much as once otherwise I fear we'll end up with a long-lived branch with a single contributor trying to get the changes made when perhaps we would have benefited from more people using and incrementally improving the implementation. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
