src/build.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Wed, 12 Nov 2008 13:14:11 +0000
changeset 1929 ad0353d93b0f
parent 1883 46b103c2df10
child 2004 edb2f8c77d4c
permissions -rw-r--r--
Merge back modularity branch to trunk.

Due to svn problems it has been merged using patch after updating modularity
with trunk rev 9900. This means that the svn log info for the files modified
in modularity branch will not be available.
carlos@0
     1
<?xml version="1.0" encoding="UTF-8" ?>
carlos@0
     2
<!--
carlos@0
     3
 *************************************************************************
carlos@0
     4
 * The contents of this file are subject to the Openbravo Public License 
carlos@0
     5
 * Version 1.1 (the "License"), being the Mozilla Public License 
carlos@0
     6
 * version 1.1  with a permitted attribution clause ; you may not use 
carlos@0
     7
 * this file except in compliance with the License. 
carlos@0
     8
 * You may obtain a copy of the License at  
carlos@0
     9
 * http://www.openbravo.com/legal/license.txt 
carlos@0
    10
 * Software distributed under the License is distributed on an 
carlos@0
    11
 * "AS IS" basis, WITHOUT WARRANTY OF  ANY KIND, either express or 
carlos@0
    12
 * implied. See the License for the specific language governing rights 
carlos@0
    13
 * and  limitations under the License. 
carlos@0
    14
 * The Original Code is Openbravo ERP. 
carlos@1471
    15
 * The Initial Developer of the Original Code is Openbravo SL 
carlos@1337
    16
 * All portions are Copyright (C) 2005-2008 Openbravo SL 
carlos@0
    17
 * All Rights Reserved. 
carlos@0
    18
 * Contributor(s): Openbravo S.L.
carlos@0
    19
 ************************************************************************
carlos@0
    20
-->
juanpablo@213
    21
juanpablo@213
    22
<!--
ivan@1738
    23
List of methods infside:
juanpablo@213
    24
juanpablo@213
    25
init: creates all the folders.
juanpablo@213
    26
trl.clean: clean the AD_TEXTINTERFACES table
juanpablo@213
    27
clean: delete all folders.
juanpablo@213
    28
copy.srcClient: copy the content of the srcClient to the src folder.
juanpablo@213
    29
sqlc: generates the java from the xsql files.
juanpablo@213
    30
compileSqlc: compiles all the java generated from the xsqls.
juanpablo@213
    31
wad: generates all the files from the mda.
juanpablo@213
    32
postwad: copies the generated files to the base design folder.
juanpablo@213
    33
postsrc: copies the src files to the base design folder and the 
juanpablo@213
    34
         xml and jasper files to the translated designs folders
asier@1929
    35
postsrc.modules: it does the same as postsrc but for module files
juanpablo@213
    36
build.local.context: copies all files to the eclipse base context 
juanpablo@213
    37
                     (WebContent...).
juanpablo@213
    38
compile.src: comiles only the src files.
juanpablo@213
    39
eclipse.compile: generates specified wad files and compiles modified xsql files.
juanpablo@213
    40
eclipse.compile.complete: generates all wad files and compiles all xsql files
juanpablo@213
    41
compile: compiles specified WAD window and src and also translates.
juanpablo@213
    42
compile.complete: compiles all WAD windows and src and also translates.
juanpablo@213
    43
translate: Translate the modified files.
juanpablo@213
    44
compile.translate: Translate the specified extensions files.
juanpablo@213
    45
installWebService: install the web services configuration file.
juanpablo@213
    46
uninstallWebService: uninstall the web services configuration file.
juanpablo@213
    47
copy.files: copy the local files to the context.
juanpablo@213
    48
compile.development: like compile, but also copies the files to the context.
juanpablo@213
    49
compile.complete.development: like compile.complete, but also copies the files 
juanpablo@213
    50
                              to the context.
asier@1929
    51
compile.web: re-builds the web folder.
asier@1929
    52
compile.web.development: like compile.web, but also copies the files to the context.
juanpablo@213
    53
build.war: build a war file in the lib directory.
juanpablo@213
    54
-->
juanpablo@213
    55
carlos@0
    56
<project name="openbravo sources" default="compile" basedir=".">
asier@1929
    57
  <property name="webTab" value="all"/>
asier@1929
    58
  <property name="tab" value="%"/>
asier@1929
    59
asier@1929
    60
  <property name="base.translate.structure" value="org/openbravo/erpWindows"/>
asier@1929
    61
  <property name="client.web.xml" value="${base.client.src}/web.xml"/>
asier@1929
    62
  <property name="package" value=""/>
asier@1929
    63
  <property name="extension" value="html"/>
asier@1929
    64
  <property name="src" value="."/>
asier@1929
    65
  <property name="tr" value="yes"/>
asier@1929
    66
  <condition property="translation">
asier@1929
    67
    <not> 
asier@1929
    68
      <equals arg1="no" arg2="${tr}"/>
asier@1929
    69
    </not>
asier@1929
    70
  </condition>
asier@1929
    71
  <target name="init">
asier@1929
    72
    <mkdir dir="${build}"/>
asier@1929
    73
    <mkdir dir="${base.design}/design"/>
asier@1929
    74
    <mkdir dir="${build.sqlc}"/>
asier@1929
    75
    <mkdir dir="${build.sqlc}/src"/>
asier@1929
    76
    <mkdir dir="${build.sqlc}/srcAD"/>
asier@1929
    77
    <mkdir dir="${build.AD}"/>
asier@1929
    78
    <mkdir dir="${build.AD}/org/openbravo/erpWindows"/>
asier@1929
    79
    <mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_actionButton"/>
asier@1929
    80
    <mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_callouts"/>
asier@1929
    81
    <mkdir dir="${build.AD}/org/openbravo/erpCommon/reference"/>
asier@1929
    82
    <mkdir dir="${build.docs}"/>
asier@1929
    83
  </target>
carlos@0
    84
ivan@1738
    85
	<target name="trl.clean" if="translation">
ivan@1738
    86
		<java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
ivan@1738
    87
			<arg line="clean ${base.config}/Openbravo.properties" />
ivan@1738
    88
			<classpath refid="project.class.path" />
ivan@1738
    89
		</java>
ivan@1738
    90
	</target>
carlos@0
    91
ivan@1738
    92
	<target name="clean" depends="trl.clean">
ivan@1738
    93
		<property name="complete" value="true" />
ivan@1738
    94
		<delete includeEmptyDirs="true" failonerror="false">
ivan@1738
    95
			<fileset dir="${base.design}" />
ivan@1738
    96
			<fileset dir="${build}" />
ivan@1738
    97
			<fileset dir="${build.docs}" />
ivan@1738
    98
			<fileset dir="${build.AD}" />
ivan@1738
    99
			<fileset dir="${build.sqlc}" />
ivan@1738
   100
		</delete>
ivan@1738
   101
	</target>
carlos@0
   102
asier@1929
   103
  <target name="sqlc" depends="copy.srcClient">
asier@1929
   104
    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
asier@1929
   105
      <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src"/>
asier@1929
   106
      <classpath refid="project.class.path"/>
asier@1929
   107
    </java>
asier@1929
   108
    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
asier@1929
   109
      <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src"/>
asier@1929
   110
      <classpath refid="project.class.path"/>
asier@1929
   111
    </java>
asier@1929
   112
    <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml"/>
asier@1929
   113
    <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf"/>
asier@1929
   114
    <ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true"/>
asier@1929
   115
  </target>
asier@1929
   116
  
asier@1929
   117
  <target name="copy.srcClient">
ivan@1738
   118
		<mkdir dir="${base.client.src}" />
ivan@1738
   119
		<copy todir="${basedir}" overwrite="true" failonerror="false">
ivan@1738
   120
			<fileset dir="${base.client.src}">
ivan@1738
   121
				<exclude name="**/web.xml" />
ivan@1738
   122
			</fileset>
ivan@1738
   123
		</copy>
ivan@1738
   124
	</target>
carlos@0
   125
asier@1929
   126
	<target name="clean.src.gen" >
asier@1929
   127
		<delete includeEmptyDirs="true" failonerror="false">
asier@1929
   128
			<fileset dir="${base.src.gen}" />
asier@1929
   129
		</delete>
ivan@1738
   130
	</target>
asier@1929
   131
  
asier@1929
   132
	<!-- <target name="generate.entities" depends="compile.src.gen,clean.src.gen">
asier@1929
   133
      <taskdef name="workflow" classpathref="project.class.path" classname="org.openarchitectureware.workflow.ant.WorkflowAntTask"/>
asier@1929
   134
   	<workflow file="${base.src}/org/openbravo/base/gen/gen_entity.oaw">
asier@1929
   135
          <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
asier@1929
   136
          <param name="base.src.gen" value="${base.src.gen}" />
asier@1929
   137
          <classpath>
asier@1929
   138
	    <path refid="project.class.path"/>
asier@1929
   139
	  </classpath>
asier@1929
   140
        </workflow> 
asier@1929
   141
</target>-->
carlos@0
   142
asier@1929
   143
asier@1929
   144
asier@1929
   145
 <target name="generate.entities" depends="compile.src.gen,clean.src.gen">
asier@1929
   146
   <taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
asier@1929
   147
   <!-- debug="true" will perform the in-memory model initialization before generating entities
asier@1929
   148
	if an error occurs then, then a stacktrace is printed. -->
asier@1929
   149
   <workflow debug="true" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw">
asier@1929
   150
     <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
asier@1929
   151
     <param name="base.src.gen" value="${base.src.gen}" />
asier@1929
   152
       <classpath>
asier@1929
   153
          <path refid="project.class.path" />
asier@1929
   154
       </classpath>
asier@1929
   155
   </workflow>
asier@1929
   156
 </target>
asier@1929
   157
asier@1929
   158
asier@1929
   159
asier@1929
   160
  <target name="compileSqlc" depends="sqlc">
asier@1929
   161
    <javac srcdir="${build.sqlc}/src:${basedir}:${build.sqlc}/srcAD/org/openbravo/erpCommon/reference:${base.src.gen}:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}"  debug="true" debuglevel="lines,vars,source" deprecation="on">
asier@1929
   162
      <classpath refid="project.class.path"/>
asier@1929
   163
    </javac>
asier@1929
   164
    <javac srcdir="${build.sqlc}/srcAD" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
asier@1929
   165
      <classpath refid="project.class.path"/>
asier@1929
   166
    </javac>
asier@1929
   167
    <javac srcdir="${build.AD}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}"  debug="true" debuglevel="lines,vars,source" deprecation="on">
asier@1929
   168
      <classpath refid="project.class.path"/>
asier@1929
   169
    </javac>
asier@1929
   170
  </target>
asier@1929
   171
  
asier@1929
   172
  <target name="compile.src.gen" depends="init">
asier@1929
   173
		<javac srcdir="${base.src}/org/openbravo/base/exception:${base.src}/org/openbravo/base/gen:${base.src}/org/openbravo/base/expression:${base.src}/org/openbravo/base/provider:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/base/session::${base.src}/org/openbravo/base/validation:${base.src}/org/openbravo/base/util" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}"  debug="true" debuglevel="lines,vars,source" deprecation="on">
ivan@1738
   174
			<classpath refid="project.class.path" />
ivan@1738
   175
		</javac>
ivan@1738
   176
	</target>
juanpablo@131
   177
asier@1929
   178
  <target name="wad" depends="init">
asier@1929
   179
    <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
asier@1929
   180
      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}'"/>
asier@1929
   181
      <classpath refid="project.class.path"/>
asier@1929
   182
    </java>
asier@1929
   183
    <antcall target="postwad" inheritall="true" inheritrefs="true"/>
asier@1929
   184
  </target>
carlos@0
   185
juanpablo@131
   186
asier@1929
   187
  <target name="postsrc" depends="postsrc.modules">
asier@1929
   188
    <copy todir="${build}" >
asier@1929
   189
      <fileset dir="${basedir}" includes="**/*.properties"/>
asier@1929
   190
    </copy>
asier@1929
   191
    <copy todir="${build}" >
asier@1929
   192
      <fileset dir="${basedir}" includes="**/*.xslt"/>
asier@1929
   193
    </copy>
asier@1929
   194
    <copy todir="${build}" >
asier@1929
   195
      <fileset dir="${basedir}" includes="**/*.hbm.xml"/>
asier@1929
   196
    </copy>
asier@1929
   197
    <copy todir="${base.design}/design" >
asier@1929
   198
      <fileset dir="${basedir}" includes="**/*.xml"/>
asier@1929
   199
    </copy>
asier@1929
   200
    <copy todir="${base.design}/design" >
asier@1929
   201
      <fileset dir="${basedir}" includes="**/*.fo"/>
asier@1929
   202
    </copy>
asier@1929
   203
    <copy todir="${base.design}/design" >
asier@1929
   204
      <fileset dir="${basedir}" includes="**/*.html"/>
asier@1929
   205
    </copy>
asier@1929
   206
    <copy todir="${base.design}/design" >
asier@1929
   207
      <fileset dir="${basedir}" includes="**/*.srpt"/>
asier@1929
   208
    </copy>
asier@1929
   209
    <copy todir="${base.design}/design" >
asier@1929
   210
      <fileset dir="${basedir}" includes="**/*.jrxml"/>
asier@1929
   211
    </copy>
asier@1929
   212
    <copy todir="${base.design}/design" >
asier@1929
   213
      <fileset dir="${basedir}" includes="**/*.jasper"/>
asier@1929
   214
    </copy>
asier@1929
   215
		<copy todir="${build}">
asier@1929
   216
			<fileset file="${base.config}/quartz.properties" />
asier@1929
   217
		</copy>	
asier@1929
   218
    <java classname="org.openbravo.translate.CommandLine_CopyFiles" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
asier@1929
   219
      <arg line="'${base.config}/Openbravo.properties' '${base.design}/design' '${base.design}' '.xml' 'true' 'false'"/>
asier@1929
   220
      <classpath refid="project.class.path"/>
asier@1929
   221
    </java>
asier@1929
   222
    <java classname="org.openbravo.translate.CommandLine_CopyFiles" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
asier@1929
   223
      <arg line="'${base.config}/Openbravo.properties' '${base.design}/design' '${base.design}' 'jasper' 'true' 'false'"/>
asier@1929
   224
      <classpath refid="project.class.path"/>
asier@1929
   225
    </java>
asier@1929
   226
    <antcall target="build.local.context" inheritAll="true" inheritrefs="true" />
asier@1929
   227
  </target>
asier@1929
   228
asier@1929
   229
 <target name="postsrc.modules">
asier@1929
   230
    <copy todir="${base.design}/design" >
asier@1929
   231
      <fileset dir="${base.modules}">
asier@1929
   232
        <include name="*/src/**/*.xml"/>
asier@1929
   233
        <include name="*/src/**/*.fo"/>
asier@1929
   234
        <include name="*/src/**/*.html"/>
asier@1929
   235
        <include name="*/src/**/*.srpt"/>
asier@1929
   236
        <include name="*/src/**/*.jrxml"/>
asier@1929
   237
        <include name="*/src/**/*.jasper"/>
asier@1929
   238
      </fileset>
asier@1929
   239
    <mapper type="regexp" from="(.*/src)(.*)" to="\2"/>
asier@1929
   240
    </copy>
asier@1929
   241
  </target>
asier@1929
   242
asier@1929
   243
 <!-- FIXME: These tasks is only for development and testing purposes, remove it afterwards-->
asier@1929
   244
 <target name="sqlcmod" depends="copy.srcClient">
asier@1929
   245
   <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
asier@1929
   246
     <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src"/>
asier@1929
   247
     <classpath refid="project.class.path"/>
asier@1929
   248
   </java>
asier@1929
   249
 </target>
asier@1929
   250
asier@1929
   251
 <target name="compileSqlcmod" depends="sqlcmod">
asier@1929
   252
    <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
asier@1929
   253
      <classpath refid="project.class.path"/>
asier@1929
   254
    </javac>
asier@1929
   255
  </target>
asier@1929
   256
 <target name="postsrcmod">
asier@1929
   257
   <copy todir="${base.design}/design" >
asier@1929
   258
     <fileset dir="${base.modules}" includes="*/src/**/*.html"/>
asier@1929
   259
     <mapper type="regexp" from="(.*/src)(.*)" to="\2"/>
asier@1929
   260
   </copy>
asier@1929
   261
 </target>
asier@1929
   262
asier@1929
   263
 <!-- end of auxiliar tasks-->
asier@1929
   264
asier@1929
   265
  <target name="build.local.context">
asier@1929
   266
    <copy todir="${base.context}"  encoding="UTF-8">
asier@1929
   267
      <fileset file="${basedir}/index.html"/>
asier@1929
   268
    </copy>
asier@1929
   269
    <copy todir="${base.context}/WEB-INF"  encoding="UTF-8">
asier@1929
   270
      <fileset file="${build.sqlc}/src/web.xml"/>
asier@1929
   271
       <fileset dir="${base.config}">
asier@1929
   272
        <exclude name="**/setup-tool/**"/>
asier@1929
   273
        <exclude name="*.template"/>
asier@1929
   274
      </fileset>
asier@1929
   275
    </copy>
asier@1929
   276
  	<copy todir="${base.context}/WEB-INF"  encoding="UTF-8">
asier@1929
   277
  		<fileset dir="${base.modules}">
asier@1929
   278
  		  <include name="*/config/**"/>
asier@1929
   279
  			<exclude name="*.template"/>
asier@1929
   280
  		</fileset>
asier@1929
   281
  		<mapper type="regexp" from="(.*/config)(.*)" to="\2"/>
asier@1929
   282
  	</copy>
asier@1929
   283
  	<copy todir="${base.context}/WEB-INF/lib"  encoding="UTF-8">
asier@1929
   284
      <fileset dir="${base.lib}/runtime">
asier@1929
   285
        <exclude name="openbravo-wad.jar"/>
asier@1929
   286
        <exclude name="openbravo-trl.jar"/>
asier@1929
   287
        <exclude name="servlet-api.jar"/>
asier@1929
   288
        <exclude name="*.war"/>
asier@1929
   289
      </fileset>
asier@1929
   290
    	<fileset dir="${base.db}/lib">
asier@1929
   291
    		<include name="*"/>
asier@1929
   292
    	</fileset>
asier@1929
   293
    </copy>
asier@1929
   294
  	
asier@1929
   295
  	<copy todir="${base.context}/WEB-INF/lib"  encoding="UTF-8">
asier@1929
   296
	  <fileset dir="${base.modules}">
asier@1929
   297
	    <include name="*/lib/runtime/**"/>
asier@1929
   298
	  </fileset>
asier@1929
   299
  	  <mapper type="regexp" from="(.*/lib/runtime)(.*)" to="\2"/>
asier@1929
   300
  	</copy>
asier@1929
   301
    <antcall target="build.web.folder" inheritAll="true" inheritrefs="true" />
asier@1929
   302
  </target>
asier@1929
   303
asier@1929
   304
  <target name="build.web.folder">
asier@1929
   305
  	<delete includeEmptyDirs="true" dir="${base.context}/web/skins" quiet="yes" />
asier@1929
   306
    <mkdir dir="${base.context}/web"/>
asier@1929
   307
asier@1929
   308
    <copy todir="${base.context}/web" encoding="UTF-8">
asier@1929
   309
      <fileset dir="${base.web}">
asier@1929
   310
      	<include name="*/**"/>
asier@1929
   311
        <exclude name="skins/**"/>
asier@1929
   312
      </fileset>
asier@1929
   313
    </copy>
asier@1929
   314
    
asier@1929
   315
  	<mkdir dir="${base.context}/web/skins"/>
asier@1929
   316
  	<mkdir dir="${base.context}/web/skins/ltr"/>
asier@1929
   317
    <copy todir="${base.context}/web/skins/ltr"  encoding="UTF-8">
asier@1929
   318
      <fileset dir="${base.web}/skins"/>
asier@1929
   319
    </copy>
asier@1929
   320
    <mkdir dir="${base.context}/web/skins/rtl"/>
asier@1929
   321
    <copy todir="${base.context}/web/skins/rtl"  encoding="UTF-8">
asier@1929
   322
      <fileset dir="${base.web}/skins"/>
asier@1929
   323
    </copy>
asier@1929
   324
  	
asier@1929
   325
    <copy todir="${base.context}/web"  encoding="UTF-8">
asier@1929
   326
     <fileset dir="${base.modules}">
asier@1929
   327
       <include name="*/web/**"/>
asier@1929
   328
     	 <exclude name="*/web/**/skins/**"/>
asier@1929
   329
     </fileset>
asier@1929
   330
     <mapper type="regexp" from="(.*)(/web)(.*)" to="\1\3"/>
asier@1929
   331
    </copy>
asier@1929
   332
  	
asier@1929
   333
    <copy todir="${base.context}/web/skins/ltr"  encoding="UTF-8">
asier@1929
   334
     <fileset dir="${base.modules}">
asier@1929
   335
       <include name="*/web/**/skins/**"/>
asier@1929
   336
     </fileset>
asier@1929
   337
     <mapper type="regexp" from="(.*)(/web)(.*)" to="\1\3"/>
asier@1929
   338
    </copy>
asier@1929
   339
  	
asier@1929
   340
    <copy todir="${base.context}/web/skins/rtl"  encoding="UTF-8">
asier@1929
   341
     <fileset dir="${base.modules}">
asier@1929
   342
       <include name="*/web/**/skins/**"/>
asier@1929
   343
     </fileset>
asier@1929
   344
     <mapper type="regexp" from="(.*)(/web)(.*)" to="\1\3"/>
asier@1929
   345
    </copy>
asier@1929
   346
  	
asier@1929
   347
    <java classname="org.openbravo.translate.RTLSkin" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
asier@1929
   348
      <arg line="${base.context}/web/skins/rtl ${base.context}/web/skins/ltr ${base.web}/skins"/>
asier@1929
   349
      <classpath refid="project.class.path"/>
asier@1929
   350
    </java>
asier@1929
   351
    <condition property="generateSpritesBool">
asier@1929
   352
      <istrue value="${generateSprites}" />
asier@1929
   353
    </condition>
asier@1929
   354
    <antcall target="generate.sprites" inheritAll="true" inheritrefs="true" />
asier@1929
   355
  </target>
asier@1929
   356
	
asier@1929
   357
	<target name="generate.sprites" description="Performs CSS sprite processing" if="generateSpritesBool">
asier@1929
   358
	    <property name="skins.location" location="${base.context}/web/skins/"/>
asier@1929
   359
	      <taskdef name="smartsprites" classname="org.carrot2.labs.smartsprites.ant.SmartSpritesTask">
asier@1929
   360
	      <classpath refid="project.class.path"/>
asier@1929
   361
	      </taskdef>
asier@1929
   362
	      <smartsprites rootdir="${skins.location}"
asier@1929
   363
	                    documentrootdir="${skins.location}"
asier@1929
   364
	                    outputdir="${skins.location}"
asier@1929
   365
	                    cssfilesuffix="-sprite"
asier@1929
   366
	                    csspropertyindent="  "
asier@1929
   367
	                    loglevel="WARN"
asier@1929
   368
	                    spritepngdepth="DIRECT"
asier@1929
   369
	                    spritepngie6="false" />
asier@1929
   370
	      <move todir="${skins.location}">
asier@1929
   371
	        <fileset dir="${skins.location}">
asier@1929
   372
	          <include name="*/*-sprite.css"/>
asier@1929
   373
	          <include name="*/*/*-sprite.css"/>
asier@1929
   374
	        </fileset>
asier@1929
   375
	        <mapper type="glob" from="*-sprite.css" to="*.css"/>
asier@1929
   376
	      </move>
asier@1929
   377
	  </target>
carlos@0
   378
ivan@1738
   379
	<target name="postwad">
ivan@1738
   380
		<copy todir="${base.design}/design">
ivan@1738
   381
			<fileset dir="${build.AD}" includes="**/*.xml" />
ivan@1738
   382
		</copy>
ivan@1738
   383
		<copy todir="${base.design}/design">
ivan@1738
   384
			<fileset dir="${build.AD}" includes="**/*.fo" />
ivan@1738
   385
		</copy>
ivan@1738
   386
		<copy todir="${base.design}/design">
ivan@1738
   387
			<fileset dir="${build.AD}" includes="**/*.html" />
ivan@1738
   388
		</copy>
ivan@1738
   389
		<copy todir="${base.design}/design">
ivan@1738
   390
			<fileset dir="${build.AD}" includes="**/*.srpt" />
ivan@1738
   391
		</copy>
ivan@1738
   392
		<copy todir="${base.design}/design">
ivan@1738
   393
			<fileset dir="${build.AD}" includes="**/*.jrxml" />
ivan@1738
   394
		</copy>
ivan@1738
   395
		<copy todir="${base.design}/design">
ivan@1738
   396
			<fileset dir="${build.AD}" includes="**/*.jasper" />
ivan@1738
   397
		</copy>
ivan@1738
   398
	</target>
juanpablo@131
   399
juanpablo@131
   400
asier@1929
   401
  <target name="eclipse.compile.complete" depends="clean,generate.entities,wad,sqlc,postsrc,translate">
david@1883
   402
  </target>
david@1883
   403
asier@1929
   404
	 <target name="eclipse.compile" depends="wad,sqlc, postsrc, translate">
asier@1929
   405
	 </target>
asier@1929
   406
	
ivan@1738
   407
	<target name="compile.src" depends="compileSqlc, postsrc, copy.files">
ivan@1738
   408
	</target>
carlos@0
   409
asier@1929
   410
  <target name="compile.complete" depends="clean,generate.entities,wad,compileSqlc,postsrc,translate">
asier@1929
   411
  </target>
carlos@0
   412
asier@1929
   413
  <target name="translate" if="translation">
asier@1929
   414
    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
asier@1929
   415
      <param name="extension" value="html"/>
asier@1929
   416
    </antcall>
asier@1929
   417
    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
asier@1929
   418
      <param name="extension" value="fo"/>
asier@1929
   419
    </antcall>
asier@1929
   420
    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
asier@1929
   421
      <param name="extension" value="srpt"/>
asier@1929
   422
    </antcall>
asier@1929
   423
    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
asier@1929
   424
      <param name="extension" value="jrxml"/>
asier@1929
   425
    </antcall>
asier@1929
   426
    <antcall inheritall="true" inheritrefs="true" target="translate.modules"/>
asier@1929
   427
  </target>
carlos@0
   428
ivan@1738
   429
	<target name="compile" depends="wad,compileSqlc, postsrc, translate">
ivan@1738
   430
	</target>
carlos@0
   431
asier@1929
   432
  <target name="translate.modules" if="translation">
asier@1929
   433
    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
asier@1929
   434
      <param name="extension" value="html"/>
asier@1929
   435
    </antcall>
asier@1929
   436
    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
asier@1929
   437
      <param name="extension" value="fo"/>
asier@1929
   438
    </antcall>
asier@1929
   439
    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
asier@1929
   440
      <param name="extension" value="srpt"/>
asier@1929
   441
    </antcall>
asier@1929
   442
    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
asier@1929
   443
      <param name="extension" value="jrxml"/>
asier@1929
   444
    </antcall>
asier@1929
   445
  </target>
carlos@0
   446
asier@1929
   447
  <target name="compile.translate.modules">
asier@1929
   448
    <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
asier@1929
   449
      <arg line="'${base.config}'/Openbravo.properties ${extension} ${base.modules} '${base.design}' '${package}' '*/src'"/>
asier@1929
   450
      <classpath refid="project.class.path"/>
asier@1929
   451
    </java>
asier@1929
   452
  </target>
asier@1929
   453
asier@1929
   454
  <target name="installWebService" depends="init" if="wsdd">
asier@1929
   455
    <java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
asier@1929
   456
      <arg line="-l${context.url}/servlet/AxisServlet ${src}/deploy.wsdd"/>
asier@1929
   457
      <classpath refid="project.class.path"/>
asier@1929
   458
    </java>
asier@1929
   459
  </target>
asier@1929
   460
carlos@0
   461
ivan@1738
   462
	<target name="compile.translate">
ivan@1738
   463
		<java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
ivan@1738
   464
			<arg line="'${base.config}'/Openbravo.properties ${extension} ${basedir} '${base.design}' ${package}" />
ivan@1738
   465
			<classpath refid="project.class.path" />
ivan@1738
   466
		</java>
ivan@1738
   467
	</target>
carlos@0
   468
carlos@0
   469
ivan@1738
   470
	<target name="uninstallWebService" depends="init">
ivan@1738
   471
		<java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
ivan@1738
   472
			<arg line="-l${context.url}/servlet/AxisServlet ${src}/undeploy.wsdd" />
ivan@1738
   473
			<classpath refid="project.class.path" />
ivan@1738
   474
		</java>
ivan@1738
   475
	</target>
carlos@0
   476
ivan@1738
   477
	<target name="copy.files">
ivan@1738
   478
		<mkdir dir="${jakarta.base}/webapps/${context.name}" />
ivan@1738
   479
		<copy todir="${jakarta.base}/webapps/${context.name}" encoding="UTF-8">
ivan@1738
   480
			<fileset dir="${base.context}" />
ivan@1738
   481
		</copy>
ivan@1738
   482
		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" />
ivan@1738
   483
		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" encoding="UTF-8">
ivan@1738
   484
			<fileset dir="${build}" />
ivan@1738
   485
		</copy>
ivan@1738
   486
	</target>
ivan@1738
   487
asier@1929
   488
	<target name="compile.development" depends="generate.entities, compile, copy.files">
ivan@1738
   489
		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
ivan@1738
   490
		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
ivan@1738
   491
		</copy>
ivan@1738
   492
	</target>
ivan@1738
   493
ivan@1738
   494
	<target name="compile.complete.development" depends="compile.complete, copy.files">
ivan@1738
   495
		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
ivan@1738
   496
		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
ivan@1738
   497
		</copy>
ivan@1738
   498
	</target>
ivan@1738
   499
asier@1929
   500
	<target name="compile.web" depends="build.web.folder">
asier@1929
   501
	</target>
asier@1929
   502
asier@1929
   503
	<target name="compile.web.development" depends="build.web.folder, copy.files">
asier@1929
   504
	</target>
asier@1929
   505
ivan@1738
   506
	<target name="build.war">
ivan@1738
   507
		<delete failonerror="false" file="${base.lib}/${context.name}.war" />
ivan@1738
   508
		<war compress="true" destfile="${base.lib}/${context.name}.war" encoding="UTF-8" webxml="${base.context}/WEB-INF/web.xml">
ivan@1738
   509
			<zipfileset dir="${base.context}">
ivan@1738
   510
				<exclude name="**/WEB-INF/web.xml" />
ivan@1738
   511
				<exclude name="**/WEB-INF/lib/servlet-api.jar" />
ivan@1738
   512
			</zipfileset>
ivan@1738
   513
			<classes dir="${build}" />
ivan@1738
   514
		</war>
ivan@1738
   515
	</target>
asier@1929
   516
	
asier@1929
   517
  <target name="generate-wsdd">
asier@1929
   518
  	<delete failonerror="false">
asier@1929
   519
  		<fileset dir="${base.src}/org/openbravo/services/webservice" includes="**/*"/>
asier@1929
   520
  	</delete>
asier@1929
   521
asier@1929
   522
asier@1929
   523
       <mkdir dir="${build}"/>
asier@1929
   524
           <axis-wsdl2java
asier@1929
   525
             output="${base.src}"
asier@1929
   526
             verbose="false"
asier@1929
   527
             url="http://65.202.45.105/openbravo/services/WebService?wsdl" serverside="true"
asier@1929
   528
             debug="false">
asier@1929
   529
             <mapping namespace="http://65.202.45.105/openbravo/services/WebService"
asier@1929
   530
               package="org.openbravo.services.webservice"/>
asier@1929
   531
             <mapping namespace="/services/WebService"
asier@1929
   532
                   package="org.openbravo.services.webservice"/>
asier@1929
   533
           </axis-wsdl2java>
asier@1929
   534
   </target>
asier@1929
   535
asier@1929
   536
carlos@0
   537
</project>