Automatically load archetypes on database migration
Description
Extend the toolbox database --update command to automatically load archetypes if they have changed since last being loaded.
For simplicity, archetypes will only be loaded if a checksum generated during build time is different to that stored when the database migration was last run. It will not take into account:
users manually changing archetypes
3rd party archetypes being loaded using toolbox archetype --load
Neither of these operations will change the stored checksum.
The checksum will be generated by a new openvpms-archetype:checksum goal that will write a file META-INF/openvpms-archetypes.properties containing either:
checksum.default - the default checksum
checksum.override - overrides the default checksum. This can be used by sites that repackage archetypes to override the default checksum and therefore automatically load their archetypes as well.
It is an error to duplicate either property - migration will fail if checksum.default or checksum.override appear multiple times on the classpath.
Extend the toolbox database --update command to automatically load archetypes if they have changed since last being loaded.
For simplicity, archetypes will only be loaded if a checksum generated during build time is different to that stored when the database migration was last run. It will not take into account:
users manually changing archetypes
3rd party archetypes being loaded using toolbox archetype --load
Neither of these operations will change the stored checksum.
The checksum will be generated by a new openvpms-archetype:checksum goal that will write a file META-INF/openvpms-archetypes.properties containing either:
checksum.default - the default checksum
checksum.override - overrides the default checksum. This can be used by sites that repackage archetypes to override the default checksum and therefore automatically load their archetypes as well.
It is an error to duplicate either property - migration will fail if checksum.default or checksum.override appear multiple times on the classpath.