WebLogic‎ > ‎Domain Creation‎ > ‎

WL domain with ant

In the Oracle WebLogic we have option to create a domain with ant script ( build.xml ) with a specialized ant task wlserver.
Here it will create a domain and starts the server also.
 
use vi build.xml and enter the following lines then run ant in the command prompt
 
My Successful build.xml for Solaris where all paths, classpath which already assigned in previous domain creation types.
 
<project name="testant" default="all" basedir=".">
<target name="newserver">   
 <delete dir="./tmp"/>   
 <mkdir dir="./tmp"/>   
 <wlserver dir="./tmp" servername="wsant" noExit="true" domainname="wdant" host="WLHOST" port="9033" generateConfig="true" username="weblogic" password="weblogic" action="start">
  <jvmarg value="-XX:MaxPermSize=192m"/>
 </wlserver>
</target>
</project>
 
Execution Results as follows:
 
bash-3.00$ ant
Buildfile: build.xml
newserver:
   [delete] Deleting directory /export/home/wluser/testant/tmp
    [mkdir] Created dir: /export/home/wluser/testant/tmp
BUILD SUCCESSFUL
Total time: 1 minute 26 seconds
[WLServer wsant] Server will not be killed due to noExit flagwsant

 
Noticed following changes to work it properly:
1. The folder name tmp is used for creating domain that can be domain directory path, we change it once the ant script run successful.
2. When I used the e-docs given ant script it is running the server after configuring domain with given parameters and automatically
Killing the ant generated process. To stop this added attribute noExit with true as value.
3. The default jvmags to start WebLogic Server not sufficient. it is throughing following Error:
        java.lang.OutOfMemoryError: PermGen space
To resolve this wlserver standalone tag changed to paired tag, and a child tag added as jvmarg.
Comments