Permalink
Browse files

LPS-27588 Don't use run.bat, use startWeblogic.cmd/sh

  • Loading branch information...
1 parent fdef984 commit b5e05306e3239775c6729d5fabd9def4b653d5a5 @brianchandotcom brianchandotcom committed Jun 12, 2012
Showing with 46 additions and 18 deletions.
  1. +46 −18 build-dist.xml
View
@@ -1210,14 +1210,6 @@ set "CLASSPATH=%FMWCONFIG_CLASSPATH%"
<arg value="/c" />
<arg value="create-weblogic-domain.bat" />
</exec>
-
- <echo file="${app.server.weblogic.instance.dir}/run.bat">@echo off
-
-set "USER_MEM_ARGS=-Xmx1024m -XX:PermSize=512m"
-
-set "MW_HOME=${app.server.weblogic.dir.windows}"
-
-call startWebLogic.cmd</echo>
</then>
<else>
<exec dir="${app.server.weblogic.dir}" executable="sh">
@@ -1247,21 +1239,57 @@ ${env.JAVA_HOME}/bin/java weblogic.WLST create-weblogic-domain.py</echo>
<exec dir="${tstamp.value}" executable="sh">
<arg value="create-weblogic-domain.sh" />
</exec>
+ </else>
+ </if>
- <echo file="${app.server.weblogic.instance.dir}/run.sh">#!/bin/sh
+ <replace file="${app.server.weblogic.instance.dir}/startWebLogic.cmd">
+ <replacetoken><![CDATA[SETLOCAL]]></replacetoken>
+ <replacevalue>
+ <![CDATA[
+ SETLOCAL
-export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=512m"
+ set "USER_MEM_ARGS=-Xmx1024m -XX:PermSize=512m"
-export MW_HOME="${app.server.weblogic.dir}"
+ set "MW_HOME=${app.server.weblogic.dir.windows}"
+ ]]>
+ </replacevalue>
+ </replace>
-sh startWebLogic.sh</echo>
+ <replace file="${app.server.weblogic.instance.dir}/startWebLogic.sh">
+ <replacetoken><![CDATA[# Any changes to this script may be lost when adding extensions to this configuration.]]></replacetoken>
+ <replacevalue>
+ <![CDATA[
+ # Any changes to this script may be lost when adding extensions to this configuration.
- <chmod
- file="${app.server.weblogic.instance.dir}/run.sh"
- perm="744"
- />
- </else>
- </if>
+ export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=512m"
+
+ export MW_HOME="${app.server.weblogic.dir}"
+ ]]>
+ </replacevalue>
+ </replace>
+
+ <copy
+ file="${app.server.weblogic.instance.dir}/startWebLogic.cmd"
+ tofile="${app.server.weblogic.instance.dir}/stopWebLogic.cmd"
+ />
+
+ <replace file="${app.server.weblogic.instance.dir}/stopWebLogic.cmd">
+ <replacefilter token="startWebLogic" value="stopWebLogic" />
+ </replace>
+
+ <copy
+ file="${app.server.weblogic.instance.dir}/startWebLogic.sh"
+ tofile="${app.server.weblogic.instance.dir}/stopWebLogic.sh"
+ />
+
+ <replace file="${app.server.weblogic.instance.dir}/stopWebLogic.sh">
+ <replacefilter token="startWebLogic" value="stopWebLogic" />
+ </replace>
+
+ <chmod
+ file="${app.server.weblogic.instance.dir}/stopWebLogic.sh"
+ perm="744"
+ />
<delete dir="${tstamp.value}" />
</target>

0 comments on commit b5e0530

Please sign in to comment.