Wednesday, February 03, 2016

Netbeans output file with Date and Version number

Create  following variable   variables in  project.properties  file
adate=2016-02-03
build_saj=0

update war.name variable
war.name=AppWar_${build_saj}_${adate}.war

update build.xml file

  <target name="-pre-init" > 
<propertyfile file="nbproject/project.properties"> 
<entry key="build_saj" value="1" type="int" operation="+"/> 
 <entry  key="adate" type="date" value="now" pattern="YYYY-MM-dd"/>
</propertyfile> 

</target>