build.xml
changeset 34983 902063f624f0
parent 34968 9982442e7119
parent 34839 44a01083360d
child 34995 7c2aaea86238
--- a/build.xml	Tue Oct 16 17:01:34 2018 +0200
+++ b/build.xml	Tue Oct 16 17:17:53 2018 +0200
@@ -108,6 +108,10 @@
       </or>
     </not>
   </condition>
+  
+  <condition property="jvm.arg.line" value="" else="--add-opens java.base/java.lang=ALL-UNNAMED">
+    <equals arg1="${ant.java.version}" arg2="1.8"/>
+  </condition>
 
   <condition property="calculate.core.rev">
    <istrue value="${calculate.core.revision}"/>
@@ -426,11 +430,6 @@
     <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
     <antcall target="build.deploy" />
     <updatesystemstatuswhennot v="RB51" previous="RB12"/>
-    <!-- only restart tomcat if the restart prop was set to true -->
-    <condition property="dorestart">
-      <istrue value="${restart}" />
-    </condition>
-    <antcall target="if.restart.tomcat" />
   </target>
 
   <target name="update.database.if.no.local" if="no.local">
@@ -459,10 +458,6 @@
     <antcall target="war" />
   </target>
 
-  <target name="if.restart.tomcat" if="dorestart">
-    <antcall target="tomcat.restart" />
-  </target>
-
   <target name="compile" depends="init,core.lib, wad.lib, trl.lib">
     <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true" />
   </target>
@@ -778,6 +773,7 @@
   <target name="apply.module" depends="compile.apply.module">
     <java classname="org.openbravo.erpCommon.modules.ApplyModuleTask" fork="true" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.src}' '${friendlyWarnings}' '${forceRefData}'" />
+      <jvmarg line="${jvm.arg.line}" />
       <classpath refid="apply.module.runtime.classpath" />
     </java>
    <delete includeEmptyDirs="true"  dir="${build.apply.module}" />
@@ -806,7 +802,7 @@
 		This task is called from the Openbravo ui, it spawns a java call which again
 		calls the restart.tomcat.do task as a spawned task.
 	-->
-  <target name="tomcat.restart" description="Restart the tomcat server process">
+  <target name="tomcat.restart">
     <echo message="Restarting tomcat..." />
     <java classname="org.openbravo.service.system.RestartTomcat" spawn="true" fork="true" maxmemory="${build.maxmemory}">
       <arg line="${base.src}" />
@@ -817,7 +813,7 @@
   <!--
 		Is called by the org.openbravo.service.system.RestartTomcat class.
 	-->
-  <target name="tomcat.restart.do" description="Restart the tomcat server process">
+  <target name="tomcat.restart.do">
     <echo message="Restarting Tomcat at ${env.CATALINA_HOME}" />
     <java classname="org.apache.catalina.startup.Bootstrap" fork="true">
       <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar:${env.CATALINA_HOME}/bin/tomcat-juli.jar" />
@@ -843,25 +839,6 @@
     </java>
   </target>
 
-  <!-- 
-		This task is called from the Openbravo ui, it spawns a java call which again
-		calls the tomcat.reload.do task as a spawned task.
-	-->
-  <target name="tomcat.reload" description="Reload the Openbravo context">
-    <echo message="Reloading webapp..." />
-    <java classname="org.openbravo.service.system.ReloadContext" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" spawn="true" fork="true">
-      <arg line="${base.src}" />
-      <classpath refid="project.class.path" />
-    </java>
-  </target>
-
-  <target name="tomcat.reload.do">
-    <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
-      <classpath refid="project.class.path" />
-    </taskdef>
-    <reload url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${context.name}" />
-  </target>
-
   <target name="tomcat.list">
     <taskdef name="list" classname="org.apache.catalina.ant.ListTask">
       <classpath refid="project.class.path" />