We faced a similar issue long time back. Here's what we ended up doing:
We generalized the config files, with ample examples and comments to indicate what each item will represent. Trying to make it easy for someone trying it out for the first time, to understand what each stands for, and how it affects the behaviour of the application.
Then we maintained a separate repo, lets say deployment-configs, just for the config files that will go into deployment. It contains all the xml files and properties files that contains configuration data, usernames and passwords, etc.
Then we worked on the app with local variables. During deployment, the deployment scripts would pull out the config files from deployment-configs repo and replace it with the config files from the application repository.
At the end of the day, we didn't open source it. But we successfully ended up separating config files with actual values out of the app repo.