...
Adding the subversion revision number to your module during packaging
It can be convenient to include the subversion revision number in your omod when packaging a module. This can be done by including the following plugin in your omod pom:
...
This will create a variable "buildNumber" which you now can include elsewhere in your pom, your config.xml, or any file that is filtered by maven during the build.For example, to include the build number in the module version, update the module config.xml as follows:
Code Block |
---|
<module configVersion="1.0"> <\!-\- Patient Flags Module Properties --> <id> (MODULE_ID)</id> <name> (MODULE_NAME)</name> <version> (MODULE_VERSION) rev:${buildNumber}</version> <package> (MODULE_PACKAGE)</package> <module configVersion="1.0"> <id> (MODULE_ID)</id> <name> (MODULE_NAME)</name> <version> (MODULE_VERSION) <id><at:var at:name="MODULE_ID" /></id> <name><at:var at:name="MODULE_NAME" /></name> <version><at:var at:name="MODULE_VERSION" /> rev:${buildNumber}</version> <package> ( <package><at:var at:name="MODULE_PACKAGE)<" /></package> |
Or, to include the build number in the omod filename, add the following to your omod pom:
Code Block |
---|
<build> <finalName>${project.artifactId}\-${project.parent.version}\-r${buildNumber}</finalName> </build> |
Read more about using this plugin here.