To assign static OIDs, either hard-code the OIDs directly or store them in properties files. Using a properties file can prevent OID conflicts by having a view of OID coverage before compilation and deployment.
Subsequent subsections assume you use a properties file to store the OIDs. To complete the OID assignment in this case, load the properties file in a build script, and then substitute OID mappings with the values defined in the properties file.
The following example Ant script fragment loads the properties in an
example-oid-mapping.properties file into the build process’s environment.
Use build scripts to substitute the OID parts defined in this file into OID assignments in annotations and deployment descriptors.