I agree with the patch
It creates/copies var and etc
And only creates repository
With changes provided in
GERONIMO-6270, the repository directory gets created automatically on server startup if it does not exist.
I would remove the comment in the patch that reads:
Karaf requires a repository local to the base path of the geronimo server instance. Karaf specifically looks for it on startup. It is intended that it be used for artifacts locally deployed to this geronimo instance being created - we do not want to deploy instance specific artifacts to the bootstrap repository which is shared among all instances in a multi-instance run-time configuration.
We describe reasoning in the Geronimo 30 docs: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html
We have the o.a.g.server.dir/repository configured in o.a.g.server.dir/etc/org.ops4j.pax.url.mvn.cfg as:
Karaf looks for artifacts to deploy from one repository if the server is a single server, or two repositories if the server is one of multiple instances. When running multiple instance karaf.home/repository is the read-only bootstrap repository, and karaf.base/repository is the read-write local deploy repository for the specific geronimo instance.
It is not safe for multiple instances to deploy to the same bootstrap repository, as one instance's deployment will be seen by another. So we need to separate out local repositories for each instance to deploy to.
If a comment is desired, I recommend this: