# Build number in module version

**URL:** <https://forum.inductiveautomation.com/t/build-number-in-module-version/9755>\
**Category:** Module Development\
**Created:** [February 27, 2015, 5:05pm UTC](https://forum.inductiveautomation.com/t/build-number-in-module-version/9755 "2015-02-27T17:05:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 27, 2015, 5:05pm UTC](https://forum.inductiveautomation.com/t/build-number-in-module-version/9755/1 "2015-02-27T17:05:35Z")

</div>

I worked out some improvements to the SDK’s build.xml files to automate updating the build # in the module.xml version property. Start by obtaining the XMLTask from [SourceForge](http://sourceforge.net/projects/xmltask/) and place it in ./IgnitionSDK/Build/AntLib/

Patch ./IgnitionSDK/Build/build.xml like so:

[code]— build.xml.orig 2014-12-17 10:44:36.000000000 -0500  
+++ build.xml 2015-02-27 11:34:08.139812291 -0500  
@@ -13,6 +13,9 @@

- 
- 
- 

@@ -24,6 +27,7 @@

```
<tstamp>
	<format property="build.date" pattern="MM/dd/yyyy hh:mm aa" />

```

- 

```
  <format property="build.tstamp" pattern="yyyyMMddHH" timezone="UTC" />

```

 [/code]

Then patch your module’s own build.xml file like so:

[code]— build.xml.orig 2015-02-27 12:00:50.192790822 -0500  
+++ build.xml 2015-02-27 11:25:58.272631673 -0500  
@@ -7,6 +7,11 @@

- 

```
  <!-- Fix up the module properties file before importing -->

```

- 

```
  <xmltask source="${project}/Build/module.xml" dest="${project}/Build/module.xml">

```

- 

```
          <replace path="//module/version/text()" withText="0.9.0.${build.tstamp}"/>

```

- 

```
  </xmltask>

```

- 

```
  <!-- Loads entries from the module xml file to get the module id, name and description. 
          These entries are used as properties throughout the rest of this file and are of
          the format 'module.name' (such as for the module's name). -->[/code]

```

Once in place, update the base version number in your build.xml in the withText attribute above. Enjoy!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 27, 2015, 5:13pm UTC](https://forum.inductiveautomation.com/t/build-number-in-module-version/9755/2 "2015-02-27T17:13:33Z")

</div>

Nice work ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

For you and others starting new projects: we’ve completely ditched the ant-based build for the SDK and moved to Maven. Check out the examples at [github.com/inductiveautomation/ … k-examples](https://github.com/inductiveautomation/ignition-sdk-examples) to see how it works.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 27, 2015, 5:40pm UTC](https://forum.inductiveautomation.com/t/build-number-in-module-version/9755/3 "2015-02-27T17:40:41Z")

</div>

. . . mumble mumble . . . young whippersnappers . . . mumble . . . lawn . . . 🙂

But seriously, thanks for the pointer. I knew y’all were doing this but hadn’t seen the WIP. Time for us old fogeys to learn Maven.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 27, 2015, 6:02pm UTC](https://forum.inductiveautomation.com/t/build-number-in-module-version/9755/4 "2015-02-27T18:02:23Z")

</div>

Haha, if the actual young whippersnappers had their way the whole thing would be Gradle based, which seems to be the trendy new build system.
