You are on page 1of 8

Stockholms Lns Landsting

BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

SLL
Weblogic Ant Build Document

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

Dokumentinformation
Dokumentgare:
Titel:

Srinivas Murthy P HP Services


BoP- Weblogic Ant build scripts

Versionshistorik
Ver.

Datum

Frfattare

Beskrivning

0.1

2011-03-16

Srinivas Murthy P

First draft

Mphasis an HP
Company

2 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

Content
1 Introduction.................................................................................................................................................... 4
2 Background.................................................................................................................................................... 4
3 Prerequisite.................................................................................................................................................... 4
3.1 ANT 4
3.2 JDK 4
3.3 Weblogic workshop...................................................................................................................................... 4
3.4 SVN 4
3.5 PATH And CLASSPATH settings................................................................................................................ 4
4 Check out Script............................................................................................................................................ 5
5 Building the application EARs..................................................................................................................... 6
6 Master Build................................................................................................................................................... 7

3 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

1 Introduction
This document describes about the steps to build ear for SLL applications through Weblogic Ant script.

2 Background
Weblogic Ant scripts have been created for building the ear files for Sll applications and seamlessly integrating with
deployment scripts without the aid of Weblogic Workshop.

3 Prerequisite
The following are necessary for building the ear files using Weblogic Ant Scripts

3.1

ANT
ANT_HOME should be set via the export command and it should point to 1.6.5 provided by weblogic.
export ANT_HOME=/opt/bea/bea_10_3/modules/org.apache.ant_1.6.5;

3.2

JDK
JAVA_HOME should be set via the export command and it should point to
export JAVA_HOME=/opt/bea/bea_10_3/jrockit_160_05

3.3

Weblogic workshop
Weblogic Ant scripts should be generated from the weblogic workshop, this should be only done once for all
application, after that the SVN will have these scripts checked and tagged.

3.4

SVN
Required SVN jars needs to be set in the class path.

3.5

PATH And CLASSPATH settings


export ANT_HOME=/opt/bea/bea_10_3/modules/org.apache.ant_1.6.5;
export JAVA_HOME=opt/bea/bea_10_3/jrockit_160_05;
export PATH={JAVA_HOME}/bin:${PATH};
export PATH=${PATH} {ANT_HOME}/bin;
export CLASSPATH=${CLASSPATH} {ANT_HOME}/lib;
export CLASSPATH={JAVA_HOME}/lib:${CLASSPATH} ;

4 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

4 Check out Script


First we need to checkout the the code from SVN, for this we have a separate ant build file,
Ant File Name: checkoutbuild.xml
Command to execute: ant f checkoutbuild.xml
Note: Already we have checkout the code in /home/weblogic/sll-weblogic-scripts/checkout/sllAuth . No need to
check out again.

5 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

5 Building the application EARs


Each application will have one master build which in turn will call the sub projects build file.
Example: For sllAuth the following is the structure
Checkout folder name for sllAuth application : /home/weblogic/sll-weblogicscripts/checkout/sllAuth
Application Build : Inside the sllAuth folder build.xml calls other build files for sllAuth application (sub
projects).
Projects Build: Inside the sllAuth folder there are sub projects like sllJava, sllConf, sllProperties .,etc contains
specific build.xml files which are responsible for building those applications.
Properties: Each application ear is dependent property file applicationname.properties
<sllAuth.properties>, this property file is used for configuring jar/war files location.

6 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

6 Master Build
The master build ant file (masterbuild.xml) is located in /home/weblogic/sll-weblogic-scripts, it is
responsible for calling any of 7 applications or all applications.
Note : This is the build script we need to call for building the ears.
Command to run the Master build file
Properties: master.properties contains the application path, we can configure to the required.
$ ant f masterbuild.xml

7 (8)

Stockholms Lns Landsting


BAT och Portal

BoP Weblogic Ant scripts


Srinivas Murthy P Mphasis an HP Company
2013-11-06
Version: 0.1

8 (8)

You might also like