author Asier Lostalé <>
Wed, 06 Feb 2019 14:36:33 +0100
changeset 35436 7d8efc4cd8e1
parent 34968 9982442e7119
permissions -rw-r--r--
related to issue 40102: combined admin and cross org modes

Added test case proving it is possible to combine both modes.
<?xml version="1.0" encoding="UTF-8" ?>
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SLU 
 * All portions are Copyright (C) 2001-2017 Openbravo SLU 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
List of targets:

init: creates all the needed folders.
clean: removes all the files and folders.
sqlc: generates java files from xsql's files.
compileSqlc: compile the java files generated from xsql's files.
compile: compile the java files of the project.
build.jar: generates the jar file in the lib folder.
build: compile the project, including the xsql's files and generates the jar
<project default="compile" basedir="." name="openbravo-trl">
  <property name="build.trl" value="${basedir}/build/classes"/>
  <property name="" value="${basedir}/docs"/>
  <property name="build.trl.sqlc" value="${basedir}/build/javasqlc"/>
  <property name="build.trl.src" value="${basedir}/src"/>
  <path id="trl.class.path">
    <pathelement path="../src-core/build/classes"/>
    <fileset dir="${base.lib}">
     <include name="**/*.jar"/>
    <pathelement path="${base.config}" />

  <target name="init">
    <mkdir dir="${build.trl}"/>
    <mkdir dir="${build.trl.sqlc}"/>
  <target name="clean">
    <delete dir="${build.trl}" failonerror="false" includeemptydirs="true"/>
    <delete dir="${}" failonerror="false" includeemptydirs="true"/>
    <delete dir="${build.trl.sqlc}" failonerror="false" includeemptydirs="true"/>
    <delete failonerror="false" file="${build.trl.lib}/openbravo-trl.jar"/>

  <target name="sqlc" depends="init">
    <java classname="" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
      <arg line="'${base.config}'/ .xsql ./src '${build.trl.sqlc}' null false"/>
      <classpath refid="trl.class.path"/>
        <propertyref name="" />

  <target name="compileSqlc" depends="sqlc">
    <javac srcdir="${build.trl.sqlc}/src" destdir="${build.trl}" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
      <classpath refid="trl.class.path"/>

  <target name="compile" depends="compileSqlc">
    <javac srcdir="${build.trl.src}" destdir="${build.trl}" deprecation="on" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
      <classpath refid="trl.class.path"/>  

  <target name="build.jar">
    <jar destfile="${build.trl.lib}/openbravo-trl.jar">
      <fileset dir="${build.trl}"/>
        <attribute name="Built-By" value="Openbravo S.L.U."/>
        <!--section name="common/class1.class">
          <attribute name="Sealed" value="false"/>
  <target name="build" depends="compile, build.jar">