build.xml
author Juan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Tue, 27 Nov 2007 09:51:44 +0000
changeset 131 9af536877763
parent 125 471aee945a8f
child 134 590ce3de05b4
permissions -rw-r--r--
Remove base.subversion, clean build.xml files
asier@43
     1
<?xml version="1.0" encoding="UTF-8" ?>
asier@43
     2
<!--
asier@43
     3
 *************************************************************************
asier@43
     4
 * The contents of this file are subject to the Openbravo  Public  License
asier@43
     5
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
asier@43
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@43
     7
 * file except in compliance with the License. You  may  obtain  a copy of
asier@43
     8
 * the License at http://www.openbravo.com/legal/license.html 
asier@43
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@43
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@43
    11
 * License for the specific  language  governing  rights  and  limitations
asier@43
    12
 * under the License. 
asier@43
    13
 * The Original Code is Openbravo ERP. 
asier@43
    14
 * The Initial Developer of the Original Code is Openbravo SL 
asier@43
    15
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
asier@43
    16
 * All Rights Reserved. 
asier@43
    17
 * Contributor(s):  ______________________________________.
asier@43
    18
 ************************************************************************
asier@43
    19
-->
asier@43
    20
asier@43
    21
<project name="openbravo" default="compile.complete" basedir=".">
juanpablo@131
    22
  <property environment="env"/>
juanpablo@131
    23
  <property file="config/Openbravo.properties"/>
asier@43
    24
  <property name="separator" value="/"/>
juanpablo@131
    25
juanpablo@131
    26
  <property name="base.context" value="${base.source}/WebContent"/>
asier@43
    27
  <property name="context.name" value="openbravo"/>
asier@43
    28
  <property name="jakarta.home" value="${env.CATALINA_HOME}"/>
juanpablo@131
    29
  <property name="build.core.lib" value="${base.source}/src-core/lib"/>
juanpablo@131
    30
  <property name="build.trl.lib" value="${base.source}/src-trl/lib"/>
juanpablo@131
    31
  <property name="build.wad.lib" value="${base.source}/src-wad/lib"/>
asier@43
    32
  <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
asier@43
    33
    <and>
asier@43
    34
      <isset property="env.CATALINA_BASE"/>
asier@43
    35
    </and>
asier@43
    36
  </condition>
asier@43
    37
  <property name="log.path" value="${jakarta.base}/logs"/>
juanpablo@131
    38
  <property name="base.src" value="${base.source}${separator}src"/>
asier@43
    39
  <property name="base.design" value="${base.context}/src-loc"/>
juanpablo@131
    40
  <property name="base.web" value="${base.source}${separator}web"/>
asier@43
    41
  <property name="base.wad" value="${base.source}${separator}src-wad"/>
asier@43
    42
  <property name="build" value="${base.source}${separator}build${separator}classes"/>
asier@43
    43
  <property name="build.AD" value="${base.source}${separator}srcAD"/>
asier@43
    44
  <property name="build.sqlc" value="${base.source}${separator}build${separator}javasqlc"/>
asier@43
    45
  <property name="build.docs" value="${base.source}${separator}docs${separator}api"/>
asier@43
    46
  <property name="lib" value="${jakarta.home}${separator}common"/>
juanpablo@131
    47
  <property name="base.lib" value="${base.source}${separator}lib"/>
juanpablo@131
    48
  <property name="base.config" value="${base.source}${separator}config"/>
asier@43
    49
  <property name="jakarta.context" value="${jakarta.base}${separator}webapps${separator}openbravo"/>
asier@43
    50
  <property name="base.client.src" value="${base.source}${separator}srcClient"/>
asier@43
    51
  <property name="build.maxmemory" value="512M"/>
asier@43
    52
  <property name="debug.level" value="false"/>
asier@43
    53
asier@43
    54
  <condition property="shell.extension" value="bat" else="sh">
asier@43
    55
    <and>
asier@43
    56
      <os family="windows"/>
asier@43
    57
    </and>
asier@43
    58
  </condition>
asier@43
    59
asier@43
    60
  <condition property="temp.folder" value="c:\Temp" else="/tmp">
juanpablo@131
    61
    <and>
juanpablo@131
    62
      <os family="windows"/>
juanpablo@131
    63
    </and>
asier@43
    64
  </condition>
asier@43
    65
stefan@124
    66
  <condition property="no.java.home" value="true">
stefan@124
    67
    <not>
stefan@125
    68
      <isset property="env.JAVA_HOME"/>
stefan@124
    69
    </not>
stefan@124
    70
  </condition>
stefan@124
    71
asier@43
    72
  <path id="project.class.path">
asier@43
    73
    <pathelement path="${build}"/>
asier@43
    74
    <fileset dir="${base.lib}">
asier@43
    75
      <include name="**/*.jar"/>
asier@43
    76
    </fileset>
asier@43
    77
    <fileset dir="${build.core.lib}">
asier@43
    78
      <include name="openbravo-core.jar"/>
asier@43
    79
    </fileset>
asier@43
    80
    <fileset dir="${build.trl.lib}">
asier@43
    81
      <include name="openbravo-trl.jar"/>
asier@43
    82
    </fileset>
asier@43
    83
    <fileset dir="${build.wad.lib}">
asier@43
    84
      <include name="openbravo-wad.jar"/>
asier@43
    85
    </fileset>
asier@43
    86
  </path>
asier@43
    87
stefan@124
    88
  <target name="init">
stefan@124
    89
    <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
stefan@124
    90
  </target>
stefan@124
    91
stefan@124
    92
  <target name="compile.complete" depends="init">
juanpablo@131
    93
    <ant dir="${base.source}/src" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
    94
  </target>
asier@43
    95
stefan@124
    96
  <target name="compile" depends="init">
juanpablo@131
    97
    <ant dir="${base.source}/src" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
    98
  </target>
asier@43
    99
stefan@124
   100
  <target name="compile.complete.development" depends="init">
juanpablo@131
   101
    <ant dir="${base.source}/src" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   102
  </target>
asier@43
   103
stefan@124
   104
  <target name="compile.development" depends="init">
juanpablo@131
   105
    <ant dir="${base.source}/src" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   106
  </target>
asier@43
   107
stefan@124
   108
  <target name="eclipse.compile" depends="init">
juanpablo@131
   109
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   110
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   111
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   112
    <ant dir="${base.source}/src" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
asier@43
   113
  </target>
asier@43
   114
stefan@124
   115
  <target name="eclipse.compile.complete" depends="init">
juanpablo@131
   116
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   117
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   118
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   119
    <ant dir="${base.source}/src" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   120
  </target>
asier@43
   121
stefan@124
   122
  <target name="compile.src" depends="init">
juanpablo@131
   123
    <ant dir="${base.source}/src" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   124
  </target>
asier@43
   125
stefan@124
   126
  <target name="war" depends="init">
juanpablo@131
   127
    <ant dir="${base.source}${separator}src" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   128
  </target>
asier@43
   129
stefan@124
   130
  <target name="core.docs" depends="init">
juanpablo@131
   131
    <ant dir="${base.source}${separator}src-core" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   132
  </target>
juanpablo@131
   133
stefan@124
   134
  <target name="core.lib" depends="init">
juanpablo@131
   135
    <ant dir="${base.source}${separator}src-core" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   136
    <copy file="${base.source}/src-core/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
asier@43
   137
  </target>
juanpablo@131
   138
stefan@124
   139
  <target name="eclipse.wad.lib" depends="init">
juanpablo@131
   140
    <ant dir="${base.source}${separator}src-wad" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   141
  </target>
juanpablo@131
   142
stefan@124
   143
  <target name="wad.docs" depends="init">
juanpablo@131
   144
    <ant dir="${base.source}${separator}src-wad" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   145
  </target>
juanpablo@131
   146
stefan@124
   147
  <target name="wad.lib" depends="init">
juanpablo@131
   148
    <ant dir="${base.source}${separator}src-wad" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   149
  </target>
juanpablo@131
   150
stefan@124
   151
  <target name="eclipse.trl.lib" depends="init">
juanpablo@131
   152
    <ant dir="${base.source}${separator}src-trl" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   153
  </target>
juanpablo@131
   154
stefan@124
   155
  <target name="trl.docs" depends="init">
juanpablo@131
   156
    <ant dir="${base.source}${separator}src-trl" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   157
  </target>
juanpablo@131
   158
stefan@124
   159
  <target name="trl.lib" depends="init">
juanpablo@131
   160
    <ant dir="${base.source}${separator}src-trl" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   161
  </target>
juanpablo@131
   162
stefan@124
   163
  <target name="database.lib" depends="init">
juanpablo@131
   164
    <ant dir="${base.source}${separator}src-db" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   165
    <copy file="${base.source}/src-db/build/lib/dbmanager.jar" todir="${base.source}/database/lib" overwrite="true" failonerror="false"/>
asier@43
   166
  </target>
asier@43
   167
stefan@124
   168
  <target name="installWebService" depends="init">
juanpablo@131
   169
    <ant dir="${base.source}/src" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   170
      <property name="wsdd" value="1"/>
asier@43
   171
    </ant>
asier@43
   172
  </target>
asier@43
   173
stefan@124
   174
  <target name="uninstallWebService" depends="init">
asier@43
   175
    <ant dir="${base.subversin}/src" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   176
  </target>
asier@43
   177
stefan@124
   178
  <target name="preinstall" depends="init">
juanpablo@131
   179
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   180
    <ant dir="${base.source}/bdutil" target="preinstall" inheritAll="true" inheritRefs="true"/>
asier@43
   181
  </target>
asier@43
   182
stefan@124
   183
  <target name="preinstall.complete" depends="init">
juanpablo@131
   184
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   185
    <ant dir="${base.source}/bdutil" target="preinstall_complete" inheritAll="true" inheritRefs="true"/>
asier@43
   186
  </target>
asier@43
   187
stefan@124
   188
  <target name="install" depends="init">
juanpablo@131
   189
    <ant dir="${base.source}/install" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   190
    <ant dir="${base.source}/install" target="install" inheritAll="true" inheritRefs="true"/>
asier@43
   191
  </target>
asier@43
   192
stefan@124
   193
  <target name="deploy" depends="init">
asier@43
   194
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   195
  </target>
asier@43
   196
stefan@124
   197
  <target name="install.source" depends="init">
asier@43
   198
    <antcall target="database.lib"/>
juanpablo@131
   199
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   200
    <antcall target="core.lib"/>
asier@43
   201
    <antcall target="wad.lib"/>
asier@43
   202
    <antcall target="trl.lib"/>
asier@43
   203
    <antcall target="compile.complete"/>
asier@43
   204
    <antcall target="installWebService"/>
asier@43
   205
    <antcall target="war"/>
asier@43
   206
  </target>
juanpablo@131
   207
stefan@124
   208
  <target name="eclipse.install.source" depends="init">
juanpablo@131
   209
    <antcall target="database.lib"/>
juanpablo@131
   210
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   211
    <antcall target="core.lib"/>
asier@43
   212
    <antcall target="wad.lib"/>
asier@43
   213
    <antcall target="trl.lib"/>
asier@43
   214
    <antcall target="compile.complete"/>
asier@43
   215
    <antcall target="installWebService"/>
asier@43
   216
  </target>
asier@43
   217
juanpablo@131
   218
  <target name="create.database" depends="init">
juanpablo@131
   219
    <antcall target="database.lib"/>
juanpablo@131
   220
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   221
  </target>
asier@43
   222
juanpablo@131
   223
  <target name="update.database" depends="init">
juanpablo@131
   224
    <ant dir="${base.source}/database" target="update.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   225
  </target>
asier@43
   226
juanpablo@131
   227
  <target name="create.database.structure" depends="init">
juanpablo@131
   228
    <ant dir="${base.source}/database" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   229
  </target>
asier@43
   230
juanpablo@131
   231
  <target name="update.database.structure" depends="init">
juanpablo@131
   232
    <ant dir="${base.source}/database" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   233
  </target>
asier@43
   234
juanpablo@131
   235
  <target name="create.database.script" depends="init">
juanpablo@131
   236
    <ant dir="${base.source}/database" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   237
  </target>
asier@43
   238
juanpablo@131
   239
  <target name="update.database.script" depends="init">
juanpablo@131
   240
    <ant dir="${base.source}/database" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   241
  </target>
adrian@97
   242
juanpablo@131
   243
  <target name="export.database.structure" depends="init">
juanpablo@131
   244
    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   245
  </target>
asier@43
   246
juanpablo@131
   247
  <target name="export.database.data" depends="init">
juanpablo@131
   248
    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   249
  </target>
asier@43
   250
juanpablo@131
   251
  <target name="import.database.data" depends="init">
juanpablo@131
   252
    <ant dir="${base.source}/database" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   253
  </target>
asier@43
   254
juanpablo@131
   255
  <target name="export.database.sampledata" depends="init">
juanpablo@131
   256
    <ant dir="${base.source}/database" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   257
  </target>
asier@43
   258
juanpablo@131
   259
  <target name="import.database.sampledata" depends="init">
juanpablo@131
   260
    <ant dir="${base.source}/database" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   261
  </target>
juanpablo@131
   262
juanpablo@131
   263
  <target name="save.database.model" depends="init">
juanpablo@131
   264
    <ant dir="${base.source}/database" target="save.database.model" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   265
  </target>
asier@43
   266
</project>