Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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:

<build>
    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>true</doCheck>
          <doUpdate>true</doUpdate>
        </configuration>
      </plugin>

    </plugins>

  </build>

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:




<module configVersion="1.0">  <\!-\- Patient Flags Module Properties --> <id>&nbsp;(MODULE_ID)</id> <name>&nbsp;(MODULE_NAME)</name> <version>&nbsp;(MODULE_VERSION) rev:${buildNumber}</version> <package>&nbsp;(MODULE_PACKAGE)</package>
<module configVersion="1.0">

<id>&nbsp;(MODULE_ID)</id>

<name>&nbsp;(MODULE_NAME)</name>

<version>&nbsp;(MODULE_VERSION) rev:${buildNumber}</version>

<package>&nbsp;(MODULE_PACKAGE)</package>



Or, to include the build number in the omod filename, add the following to your omod pom:


<build>
<finalName>${project.artifactId}\-${project.parent.version}\-r${buildNumber}</finalName>
</build>

  • No labels