Fixed issue 10091: Now run ant package.core is possible without compile
authorGuillermo Álvarez de Eulate <guillermo.alvarez@openbravo.com>
Fri, 02 Mar 2012 10:57:07 +0100
changeset 15690 cd0c49fbd501
parent 15689 a2de08d94bce
child 15691 90f0311b42bf
Fixed issue 10091: Now run ant package.core is possible without compile

The tasks that were done in java file now are done using ant.
build.xml
src/org/openbravo/erpCommon/utility/CalculateCoreRevision.java
--- a/build.xml	Mon Mar 05 13:44:27 2012 +0100
+++ b/build.xml	Fri Mar 02 10:57:07 2012 +0100
@@ -1066,11 +1066,18 @@
       <arg value="id"/>
       <arg value="-n"/>
     </exec>
-    <taskdef name="CoreRevision" classname="org.openbravo.erpCommon.utility.CalculateCoreRevision">
-            <classpath refid="project.class.path" />
-          </taskdef>
-
-    <CoreRevision hgRevNo="${hg.idno}" revision="core.rev"/>
+        <propertyfile file="currentRevision.tmp">
+          <entry key="core.rev" value="3.0.${hg.idno}"/>
+        </propertyfile>
+        <replaceregexp file="currentRevision.tmp"
+                       match="\+"
+                       replace=""
+                       byline="true"
+        />
+        <loadproperties> 
+          <file file="currentRevision.tmp"/> 
+        </loadproperties>
+        <delete file="currentRevision.tmp"/>
   </target>
   
   <target name="set.version.from.file" if="xml.core.rev">
--- a/src/org/openbravo/erpCommon/utility/CalculateCoreRevision.java	Mon Mar 05 13:44:27 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/CalculateCoreRevision.java	Fri Mar 02 10:57:07 2012 +0100
@@ -29,6 +29,7 @@
  * 
  * 
  */
+@Deprecated
 public class CalculateCoreRevision extends Task {
   private String revision;
   private String hgRevNo;