Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Building

...

and

...

Deploying

...

uPortal

...

Note

References to release numbers on this page may be different depending on the version of uPortal you are working with

 

Overview

Compiling and deploying uPortal is managed using the Ant build tool. Ant uses a file called build.xml for managing what is compiled and copies all necessary files into the uPortal context. The uPortal context can then be deployed as a complete web application running in a servlet container such as Tomcat or IBM Websphere. The build.xml file uses several properties defined in a file called build.properties. Both of these files can be found in the uPortal_rel-2-5-1

...

directory.

...

Obtaining

...

the

...

Ant

...

build

...

tool

...

If

...

using

...

the

...

uPortal-only

...

release

...

you

...

will

...

need

...

to

...

download

...

the

...

Ant

...

build

...

tool.

...

It

...

is

...

available

...

from

...

http://ant.apache.org

...

.

...

Once

...

the

...

archive

...

is

...

downloaded,

...

uncompress

...

it

...

and

...

update

...

the

...

operating

...

system

...

environment

...

such

...

that

...

it

...

is

...

available

...

fromm

...

the

...

standard

...

search

...

path.

...

It

...

is

...

recommended

...

that

...

an

...

ANT_HOME

...

environment

...

be

...

set,

...

and

...

ANT_HOME/bin

...

added

...

to

...

the

...

PATH

...

environment

...

variable.

...

Obtaining

...

external

...

dependency

...

libraries

...

If

...

using

...

the

...

quick-start

...

release,

...

all

...

of

...

the

...

external

...

dependency

...

libraries

...

(jar

...

files)

...

are

...

included,

...

and

...

can

...

be

...

found

...

in

...

uPortal_2-5-1-quick-start/uPortal_rel-2-5-1/lib

...

directory.

...

}
Note

As

of

the

2.4.

\

*

release

all

of

the

necessary

external

jar

files

are

included

in

the

lib

directory

as

well {note} {note} If using the _

well

 

If using the uPortal-only

...

release

...

you

...

will

...

have

...

to

...

obtain

...

all

...

of

...

the

...

necessary

...

external

...

dependency

...

libraries

...

before

...

attempting

...

to

...

compile

...

uPortal

...

.

...

  1. First

...

  1. create

...

  1. a

...

  1. directory

...

  1. for

...

  1. downloading

...

  1. the

...

  1. necessary

...

  1. packages,

...

  1. for

...

  1. example

...

  1. /usr/local/java

...

  1. (unix)

...

  1. or

...

  1. C:\usr\local\java

...

  1. (Windows).

...

  1. Refer

...

  1. to

...

  1. the

...

  1. build.xml

...

  1. for

...

  1. a

...

  1. complete

...

  1. list

...

  1. of

...

  1. all

...

  1. packages

...

  1. you

...

  1. will

...

  1. need

...

  1. to

...

  1. obtain.

...

  1. Look

...

  1. for

...

  1. the

...

  1. comment

...

  1. section

...

  1. labeled

...

  1. "External

...

  1. Dependencies".

...

  1. Download

...

  1. each

...

  1. of

...

  1. the

...

  1. packages

...

  1. from

...

  1. the

...

  1. location

...

  1. specifed.

...

  1. For

...

  1. example,

...

  1. the

...

  1. xalan

...

  1. jar

...

  1. files

...

  1. are

...

  1. available

...

  1. from

...

  1. http://xml.apache.org/xalan-j

...

  1. .

...

  1. It

...

  1. is

...

  1. recommended

...

  1. that

...

  1. the

...

  1. required

...

  1. version

...

  1. specified

...

  1. in

...

  1. the

...

  1. build.xml

...

  1. file

...

  1. be

...

  1. downloaded.

...

  1. Each

...

  1. package

...

  1. typically

...

  1. contains

...

  1. jar

...

  1. files,

...

  1. documentation,

...

  1. and

...

  1. other

...

  1. related

...

  1. files

...

  1. in

...

  1. an

...

  1. compressed

...

  1. archive

...

  1. (zip,

...

  1. gzipped

...

  1. tar

...

  1. file).

...

  1. Uncompress

...

  1. each

...

  1. of

...

  1. the

...

  1. packages

...

  1. into

...

  1. the

...

  1. download

...

  1. directory.

...

  1. Most

...

  1. of

...

  1. the

...

  1. packages

...

  1. will

...

  1. created

...

  1. a

...

  1. subdirectory

...

  1. for

...

  1. the

...

  1. package

...

  1. with

...

  1. lib

...

  1. ,

...

  1. doc

...

  1. ,

...

  1. and

...

  1. other

...

  1. directories

...

  1. within

...

  1. that

...

  1. directory.

...

  1. Edit

...

  1. the

...

  1. build.properties

...

  1. file

...

  1. and

...

  1. change

...

  1. the

...

  1. property

...

  1. values

...

  1. to

...

  1. point

...

  1. to

...

  1. the

...

  1. location

...

  1. of

...

  1. all

...

  1. the

...

  1. required

...

  1. jar

...

  1. files.

...


  1. For

...

  1. example,

...

  1. change:

...


  1. xalan.jar=./lib/xalan.jar

...


  1. to
    xalan.jar=/usr/local/java/xalan-j_2_4_0/bin/xalan.jar

...

  1. Note

...

  1. that

...

  1. there

...

  1. are

...

  1. some

...

  1. additional

...

  1. properties

...

  1. in

...

  1. build.properties

...

  1. which

...

  1. may

...

  1. be

...

  1. modified.

...

  1. Leave

...

  1. them

...

  1. alone

...

  1. for

...

  1. now.

...

  1. Typically

...

  1. you

...

  1. should

...

  1. not

...

  1. need

...

  1. to

...

  1. modify

...

  1. the

...

  1. build.xml

...

  1. file

...

  1. at

...

  1. all.

Review build.properties file

The build.properties file is used (along with other properties files in the properties directory) to configure how your instance of uPortal will be deployed. Review the file to make sure that directory paths match your installation. Depending on which version of the web application server you are using you may need to change the prototype context file. If using Tomcat version 5.0.* or earlier the webapp.context line should be set as follows:

Code Block

# the name of the prototype context file for Tomcat
webapp.contextFile=uPortal.xml

 

If using Tomcat 5.5.* use the following:

Code Block

# the name of the prototype context file for Tomcat
webapp.contextFile=uPortal55.xml

 

Note that if you use this context file to declare one or more DataSources you would like
the Tomcat 5.5 servlet container to instantiate and make available to uPortal via JNDI,
you also need to make the .jar files implementing those datasources available to
Tomcat 5.5 by installing them into the /common/lib directory of your Tomcat 5.5 instance.
Without the required .jar(s), Tomcat will be unable to instantiate the DataSource.

The build.xml build process does not currently install the database driver jar
(Declared as jdbcDriver.jar below) into Tomcat 5.5 /common/lib. You will need to do this manually.

Compiling uPortal

Now your ready to compile uPortal. Go to the uPortal_rel-2-5-1

...

directory

...

and

...

just

...

type

...

ant

...

.

...

Ant

...

will

...

first

...

create

...

a

...

build

...

directory,

...

then

...

invoke

...

the

...

java

...

compiler

...

and

...

store

...

all

...

of

...

the

...

compiled

...

class

...

files

...

into

...

build/WEB-INF/classes

...

.

...

It

...

will

...

also

...

copy

...

many

...

other

...

files

...

into

...

the

...

build

...

directory

...

including

...

stylesheet

...

files,

...

images,

...

and

...

property

...

files.

...

If

...

everything

...

worked

...

you

...

should

...

see

...

a

...

message

...

which

...

reads:

...

BUILD

...

SUCCESSFUL

...

If

...

something

...

went

...

wrong,

...

it

...

is

...

most

...

likely

...

due

...

to

...

Ant

...

being

...

unable

...

to

...

find

...

one

...

or

...

more

...

of

...

the

...

external

...

dependencies.

...

Check

...

the

...

build.properties

...

file

...

and

...

try

...

again.

...

Deploying

...

uPortal

...

The

...

Ant

...

build

...

tool

...

also

...

manages

...

the

...

deployment

...

of

...

the

...

uPortal

...

application

...

into

...

a

...

servlet

...

container.

...

It

...

will

...

copy

...

everything

...

that

...

it

...

compiled

...

and

...

stored

...

in

...

the

...

build

...

directory

...

into

...

a

...

directory

...

specified

...

in

...

the

...

build.properties

...

files

...

as

...

deploy.home

...

.

...

If

...

using

...

the

...

uPortal-only

...

release

...

you

...

will

...

first

...

need

...

to

...

obtain

...

a

...

servlet

...

container.

...

The

...

Tomcat

...

servlet

...

container

...

is

...

recommended.

...

Tomcat

...

can

...

be

...

downloaded

...

from

...

http://jakarta.apache.org/tomcat

...

.

...

Uncompress

...

the

...

archive

...

file

...

to

...

a

...

location

...

where

...

the

...

web

...

application

...

server

...

will

...

run.

...

For

...

example,

...

on

...

Unix,

...

extracting

...

the

...

Tomcat

...

version

...

5.5.9

...

zip

...

file

...

into

...

the

...

/usr/local

...

directory

...

will

...

create

...

a

...

directory

...

called

...

/usr/local/jakarta-tomcat-5-5-9

...

which

...

is

...

usually

...

refered

...

to

...

with

...

an

...

environment

...

variable

...

called

...

TOMCAT_HOME

...

.

...

Before

...

deploying

...

uPortal

...

you

...

may

...

need

...

to

...

modify

...

the

...

build.properties

...

.

...

Edit

...

the

...

file

...

and

...

find

...

the

...

server.home

...

and

...

deploy.home

...

properties.

...

Change

...

the

...

value

...

of

...

deploy.home

...

such

...

that

...

it

...

points

...

to

...

the

...

location

...

where

...

uPortal

...

will

...

be

...

deployed.

...

For

...

a

...

Tomcat

...

servlet

...

container

...

that

...

would

...

typically

...

be

...

$TOMCAT_HOME/webapps/

...

{app.name}

...

  • Change

...

  • the

...

  • value

...

  • of

...

  • server.home

...

  • such

...

  • that

...

  • it

...

  • points

...

  • to

...

  • your

...

  • Tomcat,

...

  • i.e.

...

  • $TOMCAT_HOME.

...

  • For

...

  • example:

...

    • deploy.home=/usr/local/jakarta-tomcat-5-5-9/webapps/uPortal

...

    • server.home=/usr/local/jakarta-tomcat-5-5-9/

...

Note

...

:

...

if

...

you

...

are

...

working

...

with

...

the

...

quick-start

...

release,

...

the

...

deployment

...

directory

...

is

...

relative

...

to

...

the

...

uPortal_rel-5-5-9

...

directory

...

(

...

../Tomcat-5-5-9/webapps/uPortal

...

)

...

and

...

should

...

not

...

be

...

changed.

...

Now

...

you're

...

ready

...

to

...

deploy

...

uPortal

...

to

...

the

...

servlet

...

container.

...

Simply

...

type

...

"ant

...

deploy

...

"

...

to

...

invoke

...

the

...

"deploy"

...

target.

...

If

...

everything

...

worked

...

correctly

...

you

...

will

...

see

...

a

...

BUILD

...

SUCCESSFULL

...

message.