synchronoss / cpo-api

Class Persistence Object (CPO) Application Programming Interface (API).
GNU Lesser General Public License v2.1
3 stars 3 forks source link

Allow the initial loading of cpoConfig and metadata from outside the jar file #41

Closed berryware closed 4 years ago

berryware commented 4 years ago

A pattern for continuous integration is to build an application once and deploy it to many environments. This gives you binary compatibility between environments and a deterministic process. This requires that environment configuration is moved outside of the binaries that are deployed. CPO currently expects the configuration information to be resources within the .jar file of the application.

This enhancement is to move the config and meta files outside the resource directory of the jar. An environment variable, CPO_CONFIG_URI will be used to specify the location of the cpo config file. This will be checked first. If it exists, it will be used for the configuration of CPO, otherwise, it will use the current logic. The metaXml tag inside the cpoConfig will likewise take a URI to identify files outside the jarfile.

berryware commented 4 years ago

Changing the env var name to CPO_CONFIG. This way it can still refer to a uri, a resource, or be the config passed in as a string.