{"id":140,"date":"2009-06-20T05:16:53","date_gmt":"2009-06-20T05:16:53","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/06\/20\/ant-script-to-reset-buildnumber\/"},"modified":"2018-09-25T10:19:42","modified_gmt":"2018-09-25T10:19:42","slug":"ant-script-to-reset-buildnumber","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ant-script-to-reset-buildnumber\/","title":{"rendered":"How to use ant Script to Reset BuildNumber?"},"content":{"rendered":"<p><!-- [if gte mso 9]><xml>  <w:WordDocument>   <w:View>Normal<\/w:View>   <w:Zoom>0<\/w:Zoom>   <w:TrackMoves\/>   <w:TrackFormatting\/>   <w:PunctuationKerning\/>   <w:ValidateAgainstSchemas\/>   <w:SaveIfXMLInvalid>false<\/w:SaveIfXMLInvalid>   <w:IgnoreMixedContent>false<\/w:IgnoreMixedContent>   <w:AlwaysShowPlaceholderText>false<\/w:AlwaysShowPlaceholderText>   <w:DoNotPromoteQF\/>   <w:LidThemeOther>EN-US<\/w:LidThemeOther>   <w:LidThemeAsian>X-NONE<\/w:LidThemeAsian>   <w:LidThemeComplexScript>X-NONE<\/w:LidThemeComplexScript>   <w:Compatibility>    <w:BreakWrappedTables\/>    <w:SnapToGridInCell\/>    <w:WrapTextWithPunct\/>    <w:UseAsianBreakRules\/>    <w:DontGrowAutofit\/>    <w:SplitPgBreakAndParaMark\/>    <w:DontVertAlignCellWithSp\/>    <w:DontBreakConstrainedForcedTables\/>    <w:DontVertAlignInTxbx\/>    <w:Word11KerningPairs\/>    <w:CachedColBalance\/>   <\/w:Compatibility>   <w:BrowserLevel>MicrosoftInternetExplorer4<\/w:BrowserLevel>   <m:mathPr>    <m:mathFont m:val=\"Cambria Math\"\/>    <m:brkBin m:val=\"before\"\/>    <m:brkBinSub m:val=\"--\"\/>    <m:smallFrac m:val=\"off\"\/>    <m:dispDef\/>    <m:lMargin m:val=\"0\"\/>    <m:rMargin m:val=\"0\"\/>    <m:defJc m:val=\"centerGroup\"\/>    <m:wrapIndent m:val=\"1440\"\/>    <m:intLim m:val=\"subSup\"\/>    <m:naryLim m:val=\"undOvr\"\/>   <\/m:mathPr><\/w:WordDocument> <\/xml><![endif]--><!-- [if gte mso 9]><xml>  <w:LatentStyles DefLockedState=\"false\" DefUnhideWhenUsed=\"true\" DefSemiHidden=\"true\" DefQFormat=\"false\" DefPriority=\"99\" LatentStyleCount=\"267\">   <w:LsdException Locked=\"false\" Priority=\"0\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Normal\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"heading 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 7\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 8\"\/>   <w:LsdException Locked=\"false\" Priority=\"9\" QFormat=\"true\" Name=\"heading 9\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 7\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 8\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" Name=\"toc 9\"\/>   <w:LsdException Locked=\"false\" Priority=\"35\" QFormat=\"true\" Name=\"caption\"\/>   <w:LsdException Locked=\"false\" Priority=\"10\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Title\"\/>   <w:LsdException Locked=\"false\" Priority=\"1\" Name=\"Default Paragraph Font\"\/>   <w:LsdException Locked=\"false\" Priority=\"11\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Subtitle\"\/>   <w:LsdException Locked=\"false\" Priority=\"22\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Strong\"\/>   <w:LsdException Locked=\"false\" Priority=\"20\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Emphasis\"\/>   <w:LsdException Locked=\"false\" Priority=\"59\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Table Grid\"\/>   <w:LsdException Locked=\"false\" UnhideWhenUsed=\"false\" Name=\"Placeholder Text\"\/>   <w:LsdException Locked=\"false\" Priority=\"1\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"No Spacing\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 1\"\/>   <w:LsdException Locked=\"false\" UnhideWhenUsed=\"false\" Name=\"Revision\"\/>   <w:LsdException Locked=\"false\" Priority=\"34\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"List Paragraph\"\/>   <w:LsdException Locked=\"false\" Priority=\"29\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Quote\"\/>   <w:LsdException Locked=\"false\" Priority=\"30\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Intense Quote\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 1\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 2\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 3\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 4\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 5\"\/>   <w:LsdException Locked=\"false\" Priority=\"60\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Shading Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"61\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light List Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"62\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Light Grid Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"63\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 1 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"64\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Shading 2 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"65\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 1 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"66\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium List 2 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"67\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 1 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"68\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 2 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"69\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Medium Grid 3 Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"70\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Dark List Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"71\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Shading Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"72\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful List Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"73\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" Name=\"Colorful Grid Accent 6\"\/>   <w:LsdException Locked=\"false\" Priority=\"19\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Subtle Emphasis\"\/>   <w:LsdException Locked=\"false\" Priority=\"21\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Intense Emphasis\"\/>   <w:LsdException Locked=\"false\" Priority=\"31\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Subtle Reference\"\/>   <w:LsdException Locked=\"false\" Priority=\"32\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Intense Reference\"\/>   <w:LsdException Locked=\"false\" Priority=\"33\" SemiHidden=\"false\" UnhideWhenUsed=\"false\" QFormat=\"true\" Name=\"Book Title\"\/>   <w:LsdException Locked=\"false\" Priority=\"37\" Name=\"Bibliography\"\/>   <w:LsdException Locked=\"false\" Priority=\"39\" QFormat=\"true\" Name=\"TOC Heading\"\/>  <\/w:LatentStyles> <\/xml><![endif]--> <!-- \/* Font Definitions *\/ @font-face {font-family:\"Cambria Math\"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} \/* Style Definitions *\/ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:\"\"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:\"Times New Roman\",\"serif\"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> <!-- [if gte mso 10]>\n\n\n\n<style>  \/* Style Definitions *\/  table.MsoNormalTable \t{mso-style-name:\"Table Normal\"; \tmso-tstyle-rowband-size:0; \tmso-tstyle-colband-size:0; \tmso-style-noshow:yes; \tmso-style-priority:99; \tmso-style-qformat:yes; \tmso-style-parent:\"\"; \tmso-padding-alt:0in 5.4pt 0in 5.4pt; \tmso-para-margin:0in; \tmso-para-margin-bottom:.0001pt; \tmso-pagination:widow-orphan; \tfont-size:10.0pt; \tfont-family:\"Times New Roman\",\"serif\";} <\/style>\n\n <![endif]--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4095 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/06\/ant-script-to-reset-buildnu.png\" alt=\"\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/06\/ant-script-to-reset-buildnu.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/06\/ant-script-to-reset-buildnu-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p class=\"MsoNormal\">To use this code, you need to have the file build.number containging:<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">major.number=1<\/p>\n<p class=\"MsoNormal\">minor.number=0<br \/>\nhotfix.number=0<\/p>\n<p class=\"MsoNormal\">revision.number=0<br \/>\ncontinuous.number=0<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">Then the following\u00a03\u00a0targets:<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">\u00a0 &lt;taskdef resource=&#8221;net\/sf\/antcontrib\/antlib.xml&#8221;\/&gt;<br \/>\n&lt;taskdef name=&#8221;unset&#8221; classname=&#8221;ise.antelope.tasks.Unset&#8221;\/&gt;<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0 &lt;target name=&#8221;initBuildNum&#8221; description=&#8221;Get current build number properties&#8221;&gt;<br \/>\n&lt;property file=&#8221;build.number&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.major&#8221; value=&#8221;${major.number}&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.minor&#8221; value=&#8221;${minor.number}&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.hotfix&#8221; value=&#8221;${hotfix.number}&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.revision&#8221; value=&#8221;${revision.number}&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.continuous&#8221; value=&#8221;${continuous.number}&#8221;\/&gt;<br \/>\n&lt;\/target&gt;<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0 &lt;target name=&#8221;getBuildNum&#8221;&gt;<br \/>\n&lt;switch value=&#8221;${increment}&#8221;&gt;<br \/>\n&lt;case value=&#8221;rebuild&#8221;\/&gt;<br \/>\n&lt;case value=&#8221;major&#8221;&gt;<br \/>\n&lt;!&#8211;Increment major, minor to 1, hotfix to 0, revision to 1&#8211;&gt;<br \/>\n&lt;math result=&#8221;next.major&#8221; operand1=&#8221;${next.major}&#8221; operation=&#8221;+&#8221; operand2=&#8221;1&#8243; datatype=&#8221;int&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.minor&#8221; value=&#8221;1&#8243; \/&gt;<br \/>\n&lt;var name=&#8221;next.hotfix&#8221; value=&#8221;0&#8243; \/&gt;<br \/>\n&lt;var name=&#8221;next.revision&#8221; value=&#8221;1&#8243; \/&gt;<br \/>\n&lt;\/case&gt;<br \/>\n&lt;case value=&#8221;minor&#8221;&gt;<br \/>\n&lt;!&#8211;Major stays the same, minor increments, hotfix goes to 0, revision to 1&#8211;&gt;<br \/>\n&lt;math result=&#8221;next.minor&#8221; operand1=&#8221;${next.minor}&#8221; operation=&#8221;+&#8221; operand2=&#8221;1&#8243; datatype=&#8221;int&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.hotfix&#8221; value=&#8221;0&#8243; \/&gt;<br \/>\n&lt;var name=&#8221;next.revision&#8221; value=&#8221;1&#8243; \/&gt;<br \/>\n&lt;\/case&gt;<br \/>\n&lt;case value=&#8221;hotfix&#8221;&gt;<br \/>\n&lt;!&#8211;Major stays the same, minor stays the same, hotfix increments, revision goes to 1&#8211;&gt;<br \/>\n&lt;math result=&#8221;next.hotfix&#8221; operand1=&#8221;${next.hotfix}&#8221; operation=&#8221;+&#8221; operand2=&#8221;1&#8243; datatype=&#8221;int&#8221;\/&gt;<br \/>\n&lt;var name=&#8221;next.revision&#8221; value=&#8221;1&#8243; \/&gt;<br \/>\n&lt;\/case&gt;<br \/>\n&lt;case value=&#8221;continuous&#8221;&gt;<br \/>\n&lt;!&#8211;For continuous integration don&#8217;t change anything but 5th build digit&#8211;&gt;<br \/>\n&lt;math result=&#8221;next.continuous&#8221; operand1=&#8221;${next.continuous}&#8221; operation=&#8221;+&#8221; operand2=&#8221;1&#8243; datatype=&#8221;int&#8221;\/&gt;<br \/>\n&lt;\/case&gt;<br \/>\n&lt;case value=&#8221;contReset&#8221;&gt;<br \/>\n&lt;!&#8211;Continuous build, but they want the 5th digit reset (i.e. new week)&#8211;&gt;<br \/>\n&lt;var name=&#8221;next.continuous&#8221; value=&#8221;1&#8243;\/&gt;<br \/>\n&lt;\/case&gt;<br \/>\n&lt;default&gt;<br \/>\n&lt;!&#8211;Update revision number only, they didn&#8217;t ask for anything special&#8211;&gt;<br \/>\n&lt;math result=&#8221;next.revision&#8221; operand1=&#8221;${next.revision}&#8221; operation=&#8221;+&#8221; operand2=&#8221;1&#8243; datatype=&#8221;int&#8221;\/&gt;<br \/>\n&lt;\/default&gt;<br \/>\n&lt;\/switch&gt;<br \/>\n&lt;\/target&gt;<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">\u00a0\u00a0\u00a0 &lt;target name=&#8221;setBuildNumber&#8221; depends=&#8221;initBuildNum,getBuildNum&#8221;&gt;<br \/>\n&lt;!&#8211;First save the build number properties&#8211;&gt;<br \/>\n&lt;propertyfile file=&#8221;build.number&#8221;&gt;<br \/>\n&lt;entry key=&#8221;major.number&#8221; value=&#8221;${next.major}&#8221;\/&gt;<br \/>\n&lt;entry key=&#8221;minor.number&#8221; value=&#8221;${next.minor}&#8221;\/&gt;<br \/>\n&lt;entry key=&#8221;hotfix.number&#8221; value=&#8221;${next.hotfix}&#8221;\/&gt;<br \/>\n&lt;entry key=&#8221;revision.number&#8221; value=&#8221;${next.revision}&#8221;\/&gt;<br \/>\n&lt;entry key=&#8221;continuous.number&#8221; value=&#8221;${next.continuous}&#8221;\/&gt;<br \/>\n&lt;\/propertyfile&gt;<br \/>\n&lt;!&#8211;Unset the properties so that we can change their values&#8211;&gt;<br \/>\n&lt;unset name=&#8221;major.number&#8221;\/&gt;<br \/>\n&lt;unset name=&#8221;minor.number&#8221;\/&gt;<br \/>\n&lt;unset name=&#8221;hotfix.number&#8221;\/&gt;<br \/>\n&lt;unset name=&#8221;revision.number&#8221;\/&gt;<br \/>\n&lt;unset name=&#8221;continuous.number&#8221;\/&gt;<br \/>\n&lt;property file=&#8221;build.number&#8221;\/&gt;<br \/>\n&lt;!&#8211;set the full.buildnumber property to be used by the build&#8211;&gt;<br \/>\n&lt;if&gt;<br \/>\n&lt;or&gt;<br \/>\n&lt;equals arg1=&#8221;${increment}&#8221; arg2=&#8221;continuous&#8221;\/&gt;<br \/>\n&lt;equals arg1=&#8221;${increment}&#8221; arg2=&#8221;contReset&#8221;\/&gt;<br \/>\n&lt;\/or&gt;<br \/>\n&lt;then&gt;<br \/>\n&lt;property name=&#8221;full.buildnumber&#8221; value=&#8221;${major.number}.${minor.number}.${hotfix.number}.${revision.number}.${continuous.number}&#8221;\/&gt;<br \/>\n&lt;\/then&gt;<br \/>\n&lt;else&gt;<br \/>\n&lt;property name=&#8221;full.buildnumber&#8221; value=&#8221;${major.number}.${minor.number}.${hotfix.number}.${revision.number}&#8221;\/&gt;<br \/>\n&lt;\/else&gt;<br \/>\n&lt;\/if&gt;<br \/>\n&lt;echo&gt;${full.buildnumber}&lt;\/echo&gt;<br \/>\n&lt;\/target&gt;<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">Add these three targets to your ant script.\u00a0 Put a &#8220;depends&#8221; to &#8220;setBuildNumber&#8221; at invocation of\u00a0your ant\u00a0script.\u00a0 Depending on what you want to do, you&#8217;ll set different vars on the way in as follows:<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\"><strong>Usage:<\/strong><br \/>\nTo build and increment revision number only:<br \/>\n&gt;Ant<br \/>\nTo move to the next major build number:<br \/>\n&gt;Ant -Dincrement=major<br \/>\nTo move to the next minor build number:<br \/>\n&gt;Ant -Dincrement=minor<br \/>\nTo move to the next hotfix build number:<br \/>\n&gt;Ant -Dincrement=hotfix<\/p>\n<p class=\"MsoNormal\">\u00a0\u00a0To do a continuous integration build incrementing 5th digit:<br \/>\n&gt;Ant -Dincrement=continuous<br \/>\nTo do a continuous integration build resetting 5th digit to 1:<br \/>\n&gt;Ant -Dincrement=contReset<\/p>\n<p class=\"MsoNormal\">\n<p class=\"MsoNormal\">Note that if you don&#8217;t set the value of increment, the build number will only have 4 digits.\u00a0 The var that holds the build number after this is called is ${full.buildnumber}.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To use this code, you need to have the file build.number containging: major.number=1 minor.number=0 hotfix.number=0 revision.number=0 continuous.number=0 Then the following\u00a03\u00a0targets: \u00a0 &lt;taskdef resource=&#8221;net\/sf\/antcontrib\/antlib.xml&#8221;\/&gt; &lt;taskdef name=&#8221;unset&#8221; classname=&#8221;ise.antelope.tasks.Unset&#8221;\/&gt; \u00a0\u00a0\u00a0 &lt;target name=&#8221;initBuildNum&#8221; description=&#8221;Get current build number properties&#8221;&gt; &lt;property file=&#8221;build.number&#8221;\/&gt; &lt;var name=&#8221;next.major&#8221; value=&#8221;${major.number}&#8221;\/&gt; &lt;var name=&#8221;next.minor&#8221; value=&#8221;${minor.number}&#8221;\/&gt; &lt;var name=&#8221;next.hotfix&#8221; value=&#8221;${hotfix.number}&#8221;\/&gt; &lt;var name=&#8221;next.revision&#8221; value=&#8221;${revision.number}&#8221;\/&gt; &lt;var name=&#8221;next.continuous&#8221; value=&#8221;${continuous.number}&#8221;\/&gt; &lt;\/target&gt; \u00a0\u00a0\u00a0 &lt;target name=&#8221;getBuildNum&#8221;&gt;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4095,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[12],"tags":[209,3326,3045,3322,3321,3320,3328,1122,3113,938,3319,3323,3325,3327,278,213,3324],"class_list":["post-140","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache-ant","tag-ant","tag-ant-reset-build-number","tag-ant-script","tag-ant-script-to-reset-buildnumber","tag-build-number","tag-buildnumber","tag-change-buildnumber","tag-guide","tag-how-to","tag-reference","tag-reset","tag-reset-buildnumber","tag-reset-buildnumber-by-ant-script","tag-resetting-build-numbers","tag-script","tag-tutorial","tag-use-ant-script-to-reset-buildnumber"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":4096,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/140\/revisions\/4096"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4095"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}