...
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.
...
Note |
---|
As of the 2.4.* release all of the necessary external jar files are included in the lib directory as well |
If using the uPortal-only release you will have to obtain all of the necessary external dependency libraries before attempting to compile uPortal.
- First create a directory for downloading the necessary packages, for example
/usr/local/java
(unix) orC:\usr\local\java
(Windows). - Refer to the
build.xml
for a complete list of all packages you will need to obtain. Look for the comment section labeled "External Dependencies". - Download each of the packages from the location specifed. For example, the xalan jar files are available from http://xml.apache.org/xalan-j. It is recommended that the required version specified in the
build.xml
file be downloaded. - Each package typically contains jar files, documentation, and other related files in an compressed archive (zip, gzipped tar file). Uncompress each of the packages into the download directory. Most of the packages will created a subdirectory for the package with
lib
,doc
, and other directories within that directory. - Edit the
build.properties
file and change the property values to point to the location of all the required jar files.
For example, change:
xalan.jar=./lib/xalan.jar
to
xalan.jar=/usr/local/java/xalan-j_2_4_0/bin/xalan.jar
- Note that there are some additional properties in
build.properties
which may be modified. Leave them alone for now. Typically you should not need to modify thebuild.xml
file at 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:
...