src-util/modulescript/build.xml
author RM packaging bot <staff.rm@openbravo.com>
Thu, 06 Jan 2011 16:33:07 +0100
changeset 9588 587ed60c60f0
parent 9085 79e55dfc8af0
child 11995 e7b20e55553e
permissions -rw-r--r--
Update AD_MODULE version to 9570
antonio@6907
     1
<?xml version="1.0" encoding="UTF-8" ?>
antonio@6907
     2
<!--
antonio@6922
     3
*************************************************************************
antonio@6922
     4
* The contents of this file are subject to the Openbravo  Public  License
priya@9085
     5
* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
antonio@6922
     6
* Version 1.1  with a permitted attribution clause; you may not  use this
antonio@6922
     7
* file except in compliance with the License. You  may  obtain  a copy of
antonio@6922
     8
* the License at http://www.openbravo.com/legal/license.html
antonio@6922
     9
* Software distributed under the License  is  distributed  on  an "AS IS"
antonio@6922
    10
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
antonio@6922
    11
* License for the specific  language  governing  rights  and  limitations
antonio@6922
    12
* under the License.
antonio@6922
    13
* The Original Code is Openbravo ERP.
antonio@6922
    14
* The Initial Developer of the Original Code is Openbravo SLU
antonio@6922
    15
* All portions are Copyright (C) 2010 Openbravo SLU
antonio@6922
    16
* All Rights Reserved.
antonio@6922
    17
* Contributor(s):  ______________________________________.
antonio@6922
    18
************************************************************************
antonio@6907
    19
-->
antonio@6907
    20
antonio@6951
    21
<project name="openbravo-modulescript" default="compile" basedir=".">
antonio@6951
    22
  <property name="build.module" value="build/classes" />
antonio@6951
    23
  <property name="build.module.sqlc" value="build/javasqlc" />
antonio@6951
    24
  <property name="build.module.src" value="src" />
antonio@6907
    25
  <property name="main.dir" value="${basedir}/../.." />
antonio@6907
    26
antonio@6951
    27
  <path id="modulescript.class.path">
antonio@6907
    28
    <pathelement path="build/classes" />
antonio@6907
    29
    <dirset dir="${base.modules}">
antonio@6907
    30
      <include name="*/build/classes/" />
antonio@6907
    31
    </dirset>
antonio@6907
    32
    <fileset dir="${base.lib}">
antonio@6907
    33
      <include name="**/*.jar" />
antonio@6907
    34
    </fileset>
antonio@6907
    35
  </path>
antonio@6907
    36
antonio@6907
    37
  <condition property="module.not.provided">
antonio@6907
    38
    <equals arg1="${module}" arg2="%" />
antonio@6907
    39
  </condition>
antonio@6907
    40
  <condition property="checkCore">
antonio@6907
    41
    <equals arg1="${module}" arg2="org.openbravo" />
antonio@6907
    42
  </condition>
antonio@6917
    43
antonio@7002
    44
  <target name="createModuleFolder" unless="checkCore">
antonio@7002
    45
     <mkdir dir="${base.modules}/${module}/build/" />
antonio@7002
    46
     <mkdir dir="${base.modules}/${module}/build/javasqlc" />
antonio@7002
    47
     <mkdir dir="${base.modules}/${module}/build/classes" />
antonio@7002
    48
  </target>
antonio@7002
    49
  
antonio@7002
    50
  <target name="init" depends="createModuleFolder">
antonio@6951
    51
    <mkdir dir="${build.module}" />
antonio@6951
    52
    <mkdir dir="${build.module.sqlc}" />
antonio@6951
    53
    <mkdir dir="${build.module.sqlc}/src" />
antonio@6907
    54
  </target>
antonio@6907
    55
antonio@6907
    56
  <target name="clean">
antonio@6951
    57
    <delete dir="${build.module}" failonerror="false" includeemptydirs="true" />
antonio@6951
    58
    <delete dir="${build.module.sqlc}" failonerror="false" includeemptydirs="true" />
antonio@6907
    59
  </target>
antonio@6907
    60
antonio@6916
    61
  <target name="sqlcCore" depends="init" if="checkCore">
antonio@6907
    62
    <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
antonio@6951
    63
      <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.module.sqlc}'" />
antonio@6951
    64
      <classpath refid="modulescript.class.path" />
antonio@7592
    65
      <syspropertyset>
antonio@7592
    66
        <propertyref name="java.security.egd" />
antonio@7592
    67
      </syspropertyset>
antonio@6907
    68
    </java>
antonio@7537
    69
    <javac srcdir="${build.module.sqlc}/src" includes="**/*.java" destdir="${build.module}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
antonio@6951
    70
      <classpath refid="modulescript.class.path" />
stefan@6923
    71
    </javac>
antonio@6916
    72
  </target>
antonio@6916
    73
antonio@6916
    74
  <target name="sqlcModules" depends="init" unless="checkCore">
stefan@6923
    75
    <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
antonio@9034
    76
      <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${base.modules}'/'${module}'/src-util/modulescript/src '${module}'/src-util/modulescript" />
antonio@6951
    77
      <classpath refid="modulescript.class.path" />
antonio@7592
    78
      <syspropertyset>
antonio@7592
    79
        <propertyref name="java.security.egd" />
antonio@7592
    80
      </syspropertyset>
stefan@6923
    81
    </java>
antonio@7537
    82
    <javac srcdir="${base.modules}/${module}/src-util/modulescript/src" includes="**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
antonio@6951
    83
      <classpath refid="modulescript.class.path" />
stefan@6923
    84
    </javac>
antonio@6907
    85
  </target>
antonio@6907
    86
antonio@6907
    87
  <target name="javacCore" if="checkCore">
antonio@7537
    88
    <javac srcdir="${main.dir}" includes="src-util/modulescript/src/**/*.java" destdir="${build.module}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
antonio@6951
    89
      <classpath refid="modulescript.class.path" />
antonio@6907
    90
    </javac>
antonio@6907
    91
  </target>
stefan@6923
    92
antonio@6907
    93
  <target name="javacModule" unless="checkCore">
antonio@7537
    94
    <javac srcdir="${main.dir}" includes="modules/${module}/src-util/modulescript/**/*.java" fork="true" destdir="${main.dir}/modules/${module}/build/classes" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
antonio@6951
    95
      <classpath refid="modulescript.class.path" />
antonio@6907
    96
    </javac>
antonio@6907
    97
  </target>
antonio@6907
    98
  
stefan@6923
    99
  <target name="compile" depends="checkmodule, sqlcCore, sqlcModules, javacCore, javacModule">
antonio@6907
   100
  </target>
antonio@6907
   101
antonio@6907
   102
  <target name="checkmodule"  if="module.not.provided">
antonio@6907
   103
    <fail>You need to specify a module</fail>
antonio@6907
   104
  </target>
antonio@6907
   105
  
antonio@6907
   106
</project>