andy, see attached. these should work. please double check.
Andy Gherna wrote:
> OK, I started a ticket in JIRA (UP-1742) and I'll start working on getting a
> patch for build.properties and build.xml soon. Thanks.
>
--
You are currently subscribed to [email protected] as: [EMAIL
PROTECTED]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-dev
<!--
This is the build.xml for uPortal which can be used in
conjunction with Ant (http://ant.apache.org/) to
build, deploy, and distribute the uPortal project. Type
"ant -projecthelp" to see a list of ant targets.
Notes:
You shouldn't need to modify this file. Instead, modify
build.properties which contains configurable paths to directories of
jar files and other resources.
"ant initportal" will deploy uPortal and load your database,
but you must first set up the JDBC properties in
rdbm.properties and possibly PersonDirs.xml,
both of which are in the properties directory. By "load", we mean
*clobber*. Do not point the initportal Ant task at data you care about.
You have been warned.
Author: Ken Weiner, [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
-->
<!-- A "project" describes a set of targets that may be requested
when Ant is executed. The "default" attribute defines the
target which is executed if no specific target is requested,
and the "basedir" attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
-->
<project name="uPortal" default="help" basedir=".">
<!-- ===================== Property Definitions =========================== -->
<!--
Each of the following properties are used in the build script.
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the "ant" command line (ant -Ddeploy.home=xyz compile)
* Definitions from a "build.properties" file in the top level
source directory
* Definitions from a "build.properties" file in the developer's
home directory
* Default definitions in this build.xml file
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
"build.properties" files as well as in the "build.xml" script.
-->
<!-- Load user property definition overrides -->
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<!-- ==================== File and Directory Names ======================== -->
<!--
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs.
app.name Base name of this application, used to
construct filenames and directories.
Defaults to "myapp".
app.version Version identifier for this application.
build.home The directory into which the "prepare" and
"compile" targets will generate their output.
Defaults to "build".
server.home The root directory of the application server
server.base The root directory of the servlet container
webapp.docBase The name of the context within the webcontainer
webapp.path URL path to the context
webapp.contextFile The name of the prototype context file
deploy.home The name of the directory into which the
deployment hierarchy will be created, and into
which the build directory will be copied.
Usually "{your_servlet_container_home}/webapps/{app.name}".
dist.home The name of the base directory in which
distribution files are created.
Defaults to "dist".
-->
<property name="app.name" value="uPortal"/>
<property name="app.version" value="UNKNOWN_VERSION"/>
<property name="build.home" value="build"/>
<fail unless="server.base">Property 'server.base' is required for the uPortal build, but it is not present.
It should be the path to the root of your Tomcat.
Did you forget to set it in build.properties?</fail>
<fail unless="deploy.home">Property 'deploy.home' is required for the uPortal build, but it is not present.
It should be the path to where you want your uPortal deployed.
Did you forget to set this in build.properties?</fail>
<property name="dist.home" value="dist"/>
<property name="webapp.DocBase" value="uPortal"/>
<property name="webapp.Path" value="/${webapp.docBase}"/>
<property name="webapp.contextFile" value="uPortal55.xml"/>
<!-- ==================== Compilation Control Options ==================== -->
<!--
These properties control option settings on the Javac compiler when it
is invoked using the <javac> task.
compile.debug Should compilation include the debug option?
compile.deprecation Should compilation include the deprecation option?
compile.optimize Should compilation include the optimize option?
-->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!-- ==================== External Dependencies =========================== -->
<!--
Use property values to define the locations of external JAR files on which
your application will depend. In general, these values will be used for
two purposes:
* Inclusion on the classpath that is passed to the Javac compiler
* Being copied into the "/WEB-INF/lib" directory during execution
of the "deploy" target.
Because we will automatically include all of the Java classes that Tomcat
exposes to web applications, we will not need to explicitly list any of those
dependencies. You only need to worry about external dependencies for JAR
files that you are going to include inside your "/WEB-INF/lib" directory.
-->
<property name="lib.compile" value="./lib/compile"/>
<property name="lib.container-common" value="./lib/container-common"/>
<property name="lib.container-common-endorsed" value="./lib/container-common-endorsed"/>
<property name="lib.container-shared" value="./lib/container-shared"/>
<property name="lib.portlets" value="./lib/portlets"/>
<property name="lib.provided" value="./lib/provided"/>
<property name="lib.runtime" value="./lib/runtime"/>
<property name="lib.test" value="./lib/test"/>
<!-- set this property to cause the build to print XML-formatted output -->
<!--<property name="tests.xmlFormat" value="true"/>-->
<!-- ==================== Compilation Classpath =========================== -->
<!--
Rather than relying on the CLASSPATH environment variable, Ant includes
features that makes it easy to dynamically construct the classpath you
need for each compilation. The example below constructs the compile
classpath to include the servlet.jar file, as well as the other components
that Tomcat makes available to web applications automatically, plus anything
that you explicitly added.
-->
<path id="compile.classpath">
<fileset dir="${lib.compile}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.provided}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.container-common}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.container-shared}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.container-common-endorsed}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================== Tests Classpath =============================== -->
<!--
Classpath for uPortal test code.
-->
<path id="tests.classpath">
<path refid="compile.classpath"/>
<fileset dir="${lib.test}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.runtime}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ==================== Help target ===================================== -->
<!--
The "help" target prints a help message describing the available targets.
This target is the default target so that deployers who blindly execute the Ant task receive help.
-->
<target name="help" description="Prints information about using this ant build file.">
<loadfile property="helpMessage"
srcFile="docs/antHelp.txt"/>
<echo message="uPortal build.xml help task:"/>
<echo message="Prints the file docs/antHelp.txt:"/>
<echo message="---"/>
<echo message="${helpMessage}"/>
</target>
<!-- ==================== All Target ====================================== -->
<!--
The "all" target is a shortcut for running the "clean" target followed
by the "compile" target, to force a complete recompile.
-->
<target name="all" depends="clean,compile"
description="Clean build and dist, then compile"/>
<!-- ==================== Clean Target ==================================== -->
<!--
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
-->
<target name="clean"
description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
<delete dir="${deploy.home}"/>
</target>
<!-- ==================== Compile Target ================================== -->
<!--
The "compile" target transforms source files (from your "src" directory)
into object files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".
-->
<target name="compile" depends="prepare"
description="Compile Java sources">
<!-- Compile Java classes as necessary -->
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac srcdir="source"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
target="1.5"
source="1.5"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<!-- Copy non-java resources -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="source" excludes="CVS,**/*.java,**/package.html"/>
</copy>
<!-- Copy associated resource files -->
<copy todir="${build.home}/WEB-INF/classes/properties">
<fileset dir="properties" includes="**/*"/>
</copy>
<!-- Copy the Logger.properties file to the well-known location log4j expects.-->
<copy file="properties/Logger.properties" tofile="${build.home}/WEB-INF/classes/log4j.properties"/>
<!-- Copy WhirlyCache to proper folder -->
<copy file="properties/whirlycache.xml" tofile="${build.home}/WEB-INF/classes/whirlycache.xml" />
<!-- Copy all stylesheets, stylesheet descriptions and stylesheet list files -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="webpages/stylesheets" includes="**/*.cpd,**/*.xsl,**/*.ssl,**/*.sdf,**/*.properties" excludes="**/*.UTF-8.properties"/>
</copy>
<!-- Copy everything in media except for files that are accessible from the web -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="webpages/media" excludes="CVS,**/*.gif,**/*.jpg,**/*.css"/>
</copy>
<!-- Copy DTDs -->
<copy file="${basedir}/webpages/dtd/channelDefinition.dtd" todir="${build.home}/WEB-INF/classes/properties/chanpub/chandefs"/>
<copy file="${basedir}/webpages/dtd/web-app_2_3.dtd" todir="${build.home}/WEB-INF/classes/org/jasig/portal/container/deploy"/>
<!-- Build Unicode-encoded property files from UTF-8 encoded ones-->
<native2ascii encoding="UTF-8" src="webpages/stylesheets" dest="${build.home}/WEB-INF/classes" includes="**/*.UTF-8.properties">
<mapper type="glob" from="*.UTF-8.properties" to="*.properties"/>
</native2ascii>
</target>
<!-- ==================== Deploy Target =================================== -->
<!--
The "deploy" target copies the contents of the build directory into a
location required by our servlet container, and picks up any external
dependencies along the way. AFter restarting the servlet container, you
can now test your web application.
-->
<target name="deploy" depends="compile"
description="Deploy application to servlet container">
<!-- Copy the contents of the build directory -->
<mkdir dir="${deploy.home}"/>
<copy todir="${deploy.home}">
<fileset dir="${build.home}" excludes="stylesheets/**"/>
</copy>
<!-- Copy external dependencies as required -->
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
<copy todir="${deploy.home}/WEB-INF/lib">
<fileset dir="${lib.compile}"/>
<fileset dir="${lib.runtime}"/>
</copy>
<!-- These are Tomcat-specific! We need to think about a new property
that lets us specify the appropriate directory for other servers
-->
<copy todir="${server.base}/shared/lib">
<fileset dir="${lib.container-shared}"/>
</copy>
<mkdir dir="${server.base}/shared/classes/org/jasig/portal/container"/>
<copy todir="${server.base}/shared/classes/org/jasig/portal/container"
file="${build.home}/WEB-INF/classes/org/jasig/portal/container/PortletServlet.class"/>
<copy todir="${server.home}/common/endorsed">
<fileset dir="${lib.container-common-endorsed}"/>
</copy>
<copy todir="${server.home}/common/lib">
<fileset dir="${lib.container-common}"/>
</copy>
<!-- This is Tomcat-specific and server name-specific!
We need to find out the best way to ensure cross-context
behavior in all servlet containers.
-->
<!--
Copy context configuration into the Tomcat server configuration directory so that Tomcat will configure the
context properly.
In the "dist" target, the .war produced includes this context declaration in its /META-INF/.
-->
<copy tofile="${server.base}/conf/Catalina/localhost/${webapp.docBase}.xml"
file="properties/${webapp.contextFile}" overwrite="true">
<filterset>
<filter token="webappDocBase" value="${webapp.docBase}"/>
<filter token="webappPath" value="${webapp.path}"/>
<filtersfile file="properties/rdbm.properties" />
</filterset>
</copy>
<copy todir="${server.base}/conf/Catalina/localhost" file="properties/proxyportlet.xml"/>
<!-- Deploy classes to support the modified version of WSRP4J's proxyportlet.
Consider making these classes part of the proxyportlet.war distribution.
-->
<mkdir dir="${deploy.home}/../proxyportlet/WEB-INF/classes/org/jasig/portal/wsrp/consumer/portlet"/>
<copy todir="${deploy.home}/../proxyportlet/WEB-INF/classes/org/jasig/portal/wsrp/consumer/portlet">
<fileset dir="${build.home}/WEB-INF/classes/org/jasig/portal/wsrp/consumer/portlet"/>
</copy>
</target>
<!-- ==================== Dist Target ===================================== -->
<!--
The "dist" target creates a binary distribution of your application
in a directory structure ready to be archived in a tar.gz or zip file.
Note that this target depends on two others:
* "deploy" so that the entire web application (including external
dependencies) will have been assembled
* "javadoc" so that the application Javadocs will have been created
-->
<target name="dist" depends="deploy,javadoc"
description="Create binary distribution">
<!-- Copy documentation subdirectory -->
<copy todir="${dist.home}/docs">
<fileset dir="docs"/>
</copy>
<!--
The context file goes into META-INF so it will be part of the .war file and available
to deployment processes that honor it, such as deployment via the Tomcat manager application.
-->
<mkdir dir="${deploy.home}/META-INF"/>
<copy tofile="${deploy.home}/META-INF/context.xml" file="${server.base}/conf/Catalina/localhost/${webapp.docBase}.xml"/>
<!-- Create application WAR file -->
<jar jarfile="${dist.home}/${app.name}.war"
basedir="${deploy.home}"/>
<!-- Create application JAR file -->
<jar jarfile="${dist.home}/${app.name}-${app.version}.jar"
basedir="${deploy.home}/WEB-INF/classes"/>
<!-- Copy additional files to ${dist.home} as necessary -->
</target>
<!-- ==================== Javadoc Target ================================== -->
<!--
The "javadoc" target creates Javadoc API documentation for the Java
classes included in your application. Normally, this is only required
when preparing a distribution release, but is available as a separate
target in case the developer wants to create Javadocs independently.
-->
<target name="javadoc" depends="compile"
description="Create Javadoc API documentation">
<mkdir dir="${dist.home}/docs/api"/>
<javadoc sourcepath="source"
classpathref="compile.classpath"
destdir="${dist.home}/docs/api"
packagenames="org.jasig.portal.*"
access="public"
author="true"
version="true"
windowtitle="${app.name} ${app.version} API Documentation">
<doctitle><![CDATA[${app.name} ${app.version}<br/>API Documentation]]></doctitle>
<header><![CDATA[${app.name} ${app.version}<br/>API Documentation]]></header>
</javadoc>
</target>
<!--
This "javadoXHtml' target takes the html files produced by the "javadoc" target
and runs them throug xom and tagsoup to produce XHTML complient html files
-->
<target name="javadocXHtml" depends="javadoc">
<!--
Sanitize the javadoc
-->
<echo message="Sanitizing the javadoc files"/>
<java classname="org.jasig.portal.utils.XHTMLJavaDoc" fork="yes">
<jvmarg value="-Xbootclasspath/p:${lb.container-common-endorsed}"/>
<classpath refid="compile.classpath" />
<arg value="${dist.home}/docs/api"/>
</java>
</target>
<!-- ==================== Prepare Target ================================== -->
<!--
The "prepare" target is used to create the "build" destination directory,
and copy the static contents of your web application to it. If you need
to copy static files from external dependencies, you can customize the
contents of this task.
Normally, this task is executed indirectly when needed.
-->
<target name="prepare">
<mkdir dir="${dist.home}"/>
<!-- Create build directory and copy static content -->
<mkdir dir="${build.home}"/>
<copy todir="${build.home}">
<fileset dir="webpages"/>
</copy>
<!-- Copy static files from external dependencies as needed -->
<!-- Test that JAXP is installed in the JVM before trying to compile all of uPortal -->
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac srcdir="source"
target="1.5"
source="1.5"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<include name="org/jasig/portal/tools/LibCheck.java"/>
<classpath refid="compile.classpath"/>
</javac>
<java fork="true" failonerror="true" dir="" classname="org.jasig.portal.tools.LibCheck">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
</java>
</target>
<!-- ==================== initportal Target ================================ -->
<!--
The "initportal" target runs all the targets necessary to deploy the portal
and prepare the portal database: deploy, db, i18n-db, pubchan, pubfragments
-->
<target name="initportal"
description="Runs all the targets necessary to deploy the portal and prepare the portal database">
<echo message="Initializing uPortal"/>
<antcall target="deploy"/>
<antcall target="db"/>
<antcall target="pubchan">
<param name="channel" value="all"/>
</antcall>
<antcall target="i18n-db"/>
<antcall target="pubfragments">
<param name="fragmentFile" value="/properties/al/fragments.xml"/>
</antcall>
<antcall target="deployPortletApp">
<param name="portletApp" value="all"/>
</antcall>
<echo message="Finished initializing uPortal"/>
</target>
<!-- ==================== DbLoader Target ================================= -->
<!--
The "db" target runs uPortal's DbLoader program to load the database.
WARNING: THIS MAY ERASE EXISTING uPORTAL TABLES!!!
The "db" target accepts command line arguments which override values
read from the dbloader.xml file:
The "db" target can be invoked thusly:
To use /properties/db/mytables.xml instead of the tables file specified in
dbloader.xml:
ant db -Dusetable=-t -Dtablefile=/properties/db/mytables.xml
To use /properties/db/mydata.xml instead of the data file specified in
dbloader.xml:
ant db -Dusedata=-d -Ddatafile=/properties/db/mydata.xml
Note: the tables and data files can both be overridden by combining the
arguments. The usetable and tablefile must be used in tandem and
sequentially on the command line. Similarly, usedata and datafile must but
used in tandem.
Addtionally, several other boolean flags may be overridden.
To set createScript=true
ant db -Dcreatescript=-c
To set createScript=false
ant db -Dcreatescript=-nc
To set dropTables=true
ant db -Ddroptables=-D
To set dropTables=false
ant db -Ddroptables=-nD
To set createTables=true
ant db -Dcreatetables=-C
To set createTables=false
ant db -Dcreatetables=-nC
To set populateTables=true
ant db -Dpopulatetables=-P
To set populateTables=false
ant db -Dpopulatetables=-nP
The -c, -nc, -D, -nD, -C, -nC, -P, -nP arguements may all be used
independantly or in any combination although it would not make sense to,
for example, use both -c and -nc.
-->
<target name="db" depends="compile"
description="Loads database tables and data">
<echo message="Invoking DbLoader"/>
<property name="usetable" value=" "/>
<property name="tablefile" value=" "/>
<property name="usedata" value=" "/>
<property name="datafile" value=" "/>
<property name="createscript" value=" "/>
<property name="droptables" value=" "/>
<property name="createtables" value=" "/>
<property name="populatetables" value=" "/>
<property name="localeaware" value=" "/>
<property name="adminlocale" value=" "/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.dbloader.DbLoader">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${usetable}"/>
<arg value="${tablefile}"/>
<arg value="${usedata}"/>
<arg value="${datafile}"/>
<arg value="${createscript}"/>
<arg value="${droptables}"/>
<arg value="${createtables}"/>
<arg value="${populatetables}"/>
<arg value="${localeaware}"/>
<arg value="${adminlocale}"/>
</java>
</target>
<target name="i18n-db" depends="compile"
description="Loads internationalization tables and data">
<echo message="Invoking DbLoader for internationalized database setting"/>
<property name="usetable" value="-t"/>
<property name="tablefile" value="/properties/db/tables-i18n.xml"/>
<property name="usedata" value="-d"/>
<property name="datafile" value="/properties/db/data-i18n.xml"/>
<property name="createscript" value=" "/>
<property name="droptables" value=""/>
<property name="createtables" value=" "/>
<property name="populatetables" value=" "/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.dbloader.DbLoader">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${usetable}"/>
<arg value="${tablefile}"/>
<arg value="${usedata}"/>
<arg value="${datafile}"/>
<arg value="${createscript}"/>
<arg value="${droptables}"/>
<arg value="${createtables}"/>
<arg value="${populatetables}"/>
</java>
</target>
<target name="l10n-db" depends="compile"
description="Loads localized data">
<echo message="Invoking DbLoader for localizationed database setting"/>
<property name="locale" value="en_US"/>
<property name="usetable" value="-t"/>
<property name="tablefile" value="/properties/db/tables-l10n.xml"/>
<property name="usedata" value="-d"/>
<property name="datafile" value="/properties/db/data-l10n.xml"/>
<property name="createscript" value=" "/>
<property name="droptables" value=" "/>
<property name="createtables" value=""/>
<property name="populatetables" value=" "/>
<property name="localeaware" value="-l"/>
<property name="adminlocale" value="en_US"/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.dbloader.DbLoader">
<classpath>
<path refid="compile.path"/>
</classpath>
<arg value="${usetable}"/>
<arg value="${tablefile}"/>
<arg value="${usedata}"/>
<arg value="${datafile}"/>
<arg value="${createscript}"/>
<arg value="${droptables}"/>
<arg value="${createtables}"/>
<arg value="${populatetables}"/>
<arg value="${localeaware}"/>
<arg value="${adminlocale}"/>
</java>
</target>
<!-- ==================== DbUnload Target ================================= -->
<!--
The "dbunload" target runs uPortal's DbUnload program to dump a database table.
to run this target, you must specify the table name and output file parameters
on the command line.
For example:
ant dbunload -Dtablename=up_channel -Dxmlfile=-
-->
<target name="dbunload" depends="compile"
description="Dumps a database table to a flat file in XML format">
<echo message="Invoking DbUnload"/>
<property name="tablename" value=" "/>
<property name="xmlfile" value=" "/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.dbloader.DbUnload">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${tablename}"/>
<arg value="${xmlfile}"/>
</java>
</target>
<!-- ==================== DbTest Target ================================= -->
<!--
The "dbtest" target runs uPortal's DbTest program to display information
about the database defined in rdbm.properties
ant dbtest
-->
<target name="dbtest" depends="compile"
description="Displays information about the database defined in rdbm.properties">
<echo message="Invoking DbTest"/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.DbTest">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
</java>
</target>
<!-- ========= The fragment loader for aggregated layouts ========= -->
<!--
The variable fragmentFile points to the XML file of the fragments definition
ant pubfragments -DfragmentFile=/properties/al/fragments.xml
-->
<target name="pubfragments" depends="compile"
description="Loads ALM fragments into the uPortal database">
<property name="tempDataXML" value="/properties/al/fragment.temp.data.xml"/>
<property name="fragmentFile" value=" "/>
<echo message="Resetting layout fragments configuration."/>
<!-- create data.xml file -->
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.layout.alm.tool.FragmentLoader">
<arg value="${fragmentFile}"/>
<arg value="${build.home}/WEB-INF/classes/${tempDataXML}"/>
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
</java>
<available file="${build.home}/WEB-INF/classes/${tempDataXML}"
property="temp.fragment.data.file.present"/>
<antcall target="pubfragments.load"/>
<echo message="Done updating ALM fragment configuration."/>
</target>
<target name="pubfragments.load" if="temp.fragment.data.file.present">
<!-- load data.xml file -->
<echo message="Loading new fragments into the database."/>
<java fork="true" failonerror="true" dir="${build.home}/WEB-INF/classes"
classname="org.jasig.portal.tools.dbloader.DbLoader">
<arg value="-d"/>
<arg value="${tempDataXML}"/>
<arg value="-nC"/>
<arg value="-nD"/>
<arg value="-P"/>
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
</java>
<delete file="${build.home}/WEB-INF/classes/${tempDataXML}"/>
</target>
<!-- ==================== md5passwd Target ================================ -->
<!--
The "md5passwd" target runs uPortal's md5passwd program to create an entry for
a user in the UP_PERSON_DIR table. To run this target, you must specify
the username parameter in the command line. For example:
ant md5passwd -Dusername=ken
-->
<target name="md5passwd" depends="compile"
description="Creates a user in the UP_PERSON_DIR table">
<echo message="Invoking Md5Passwd"/>
<property name="username" value=" "/>
<java dir="${basedir}" classname="org.jasig.portal.security.Md5Passwd">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="-c"/>
<arg value="${username}"/>
</java>
</target>
<!-- ==================== deluser Target ============================ -->
<!--
The deluser target runs uPortal's DeleteUser program to delete all
traces of a uportal user from the uPortal database.
Examples:
ant deluser -Duser=username
ant deluser -Duser=ashenoy
-->
<target name="deluser"
description="Delete traces of a user from the portal database">
<echo message="Invoking DeleteUser"/>
<property name="user" value=" "/>
<java dir="${basedir}" classname="org.jasig.portal.tools.DeleteUser" fork="true" >
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${user}"/>
</java>
</target>
<!-- ==================== regchantype Target ============================== -->
<!--
The "regchantype" target runs uPortal's RegisterChannelType program to
create an entry for a new generic channel in the UP_CHAN_TYPE table.
To run this target, you must specify the class, name, description, and
uri parameters in the command line. For example:
ant regchantype
-Dclass=org.jasig.portal.channels.CImage
-Dname="Image Channel"
-Ddescription="Displays image with optional title and subtitle"
-Duri=/org/jasig/portal/channels/CImage/CImage.cpd
-->
<target name="regchantype" depends="compile"
description="Registers a new channel type">
<echo message="Invoking RegisterChannelType"/>
<property name="class" value=" "/>
<property name="name" value=" "/>
<property name="description" value=" "/>
<property name="uri" value=" "/>
<java dir="${basedir}" classname="org.jasig.portal.tools.RegisterChannelType">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${class}"/>
<arg value="${name}"/>
<arg value="${description}"/>
<arg value="${uri}"/>
</java>
</target>
<!-- ==================== addstylesheet Target ============================ -->
<!--
The "addstylesheet" target runs uPortal's RegisterStylesheet program to
add core framework stylesheets used to create structures and themes.
Example:
ant addstylesheet
-DstylesheetType=-t
-DstylesheetUri=/org/jasig/portal/layout/tab-column/nested-tables/nested-tables.xsl
-DdescriptionUri=/org/jasig/portal/layout/tab-column/nested-tables/nested-tables.sdf
where -s = specify structure stylesheet
-t = specify theme stylesheet
-->
<target name="addstylesheet" depends="compile"
description="Registers a new theme or structure">
<echo message="Invoking RegisterStylesheet (add)"/>
<property name="stylesheetType" value=" "/>
<property name="stylesheetUri" value=" "/>
<property name="descriptionUri" value=" "/>
<java dir="${basedir}" fork="true" classname="org.jasig.portal.tools.RegisterStylesheet">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${stylesheetType}"/>
<arg value="${stylesheetUri}"/>
<arg value="${descriptionUri}"/>
</java>
</target>
<!-- ==================== modstylesheet Target ============================ -->
<!--
The "modstylesheet" target runs uPortal's RegisterStylesheet program to
update core framework stylesheets used to create structures and themes.
Example:
ant modstylesheet
-DstylesheetType=-s
-DstylesheetUri=/org/jasig/portal/layout/tab-column/tab-column.xsl
-DdescriptionUri=/org/jasig/portal/layout/tab-column/tab-column.sdf
-DstylesheetId=1
where -s = specify structure stylesheet
-t = specify theme stylesheet
-->
<target name="modstylesheet" depends="compile"
description="Modifies an existing theme or structure">
<echo message="Invoking RegisterStylesheet (modify)"/>
<property name="stylesheetType" value=" "/>
<property name="stylesheetUri" value=" "/>
<property name="descriptionUri" value=" "/>
<property name="stylesheetId" value=" "/>
<java dir="${basedir}" fork="true" classname="org.jasig.portal.tools.RegisterStylesheet">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${stylesheetType}"/>
<arg value="-u"/>
<arg value="${stylesheetUri}"/>
<arg value="${descriptionUri}"/>
<arg value="${stylesheetId}"/>
</java>
</target>
<!-- ==================== delstylesheet Target ============================ -->
<!--
The "delstylesheet" target runs uPortal's RegisterStylesheet program to
delete core framework stylesheets used to create structures and themes.
Example:
ant delstylesheet -DstylesheetType=-t -DstylesheetId=1
where -s = specify structure stylesheet
-t = specify theme stylesheet
-->
<target name="delstylesheet" depends="compile"
description="Deletes an existing theme or structure">
<echo message="Invoking RegisterStylesheet (delete)"/>
<property name="stylesheetType" value=" "/>
<property name="stylesheetId" value=" "/>
<java dir="${basedir}" classname="org.jasig.portal.tools.RegisterStylesheet">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${stylesheetType}"/>
<arg value="-d"/>
<arg value="${stylesheetId}"/>
</java>
</target>
<!-- ====================== compiletests Target =========================== -->
<!--
Compiles JUnit tests.
-->
<target name="compiletests" depends="compile"
description="Compile JUnit Tests">
<javac srcdir="tests"
target="1.5"
source="1.5"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="tests.classpath"/>
</javac>
<!-- Copy everything in media except for the source files -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="tests" excludes="CVS,**/*.java"/>
</copy>
</target>
<!-- ======================= runtests Target ============================== -->
<!--
Runs all uPortal JUnit-based test code
-->
<!-- You must copy junit.jar into $ANT_HOME/lib directory for this to work -->
<target name="runtests" depends="compiletests" description="Run JUnit Test Suite">
<mkdir dir="${dist.home}/testresults"/>
<junit fork="true" printsummary="off" showoutput="off" dir=".."
haltonerror="true" haltonfailure="true">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="tests.classpath"/>
<path location="${build.home}/WEB-INF/classes"/>
</classpath>
<batchtest todir="${dist.home}/testresults">
<fileset dir="${build.home}/WEB-INF/classes">
<include name="**/*Test.class"/>
<exclude name="**/Abstract*Test.class"/>
<exclude name="**/*AbstractTest.class"/>
<exclude name="**/DbTest.class"/>
</fileset>
</batchtest>
<formatter type="brief" usefile="no"/>
<formatter type="xml" usefile="yes" if="tests.xmlFormat" />
</junit>
</target>
<!-- ======================= swingtests Target ============================ -->
<!--
Run JUnit tests with Swing.
-->
<target name="swingtests" depends="compiletests" description="Run JUnit Test Suite">
<java fork="true" failonerror="true" classname="junit.swingui.TestRunner">
<classpath>
<path refid="tests.classpath"/>
<path location="${build.home}/WEB-INF/classes"/>
</classpath>
<arg value="org.jasig.portal.AllTests"/>
</java>
</target>
<!-- ==================== RunXSLT Target ================================ -->
<!--
The "RunXSLT" target runs uPortal's RunXSLT program to perform an xsl
transform using uPortal XML libraries. For example:
ant RunXSLT -DXmlInput=UP_SEQUENCE_20.XML -DoutputFile=NEW_UP_SEQUENCE.XML -DXslfile=UP_SEQUENCE.xsl
where XmlInput is the file to be transformed,
outputFile is where the result should saved and
Xslfile is the URL(!) of the xsl file to be used in the transform.
-->
<target name="runxslt" depends="compile"
description="Performs an XSLT transformation">
<echo message="Invoking RunXSLT"/>
<mkdir dir="${build.home}/RunXSLT"/>
<copy todir="${build.home}/RunXSLT" >
<fileset dir="${build.home}/stylesheets/org/jasig/portal/tools/RunXSLT"/>
</copy>
<property name="XmlInput" value=" "/>
<property name="Xslfile" value=" "/>
<property name="outputFile" value=" "/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.RunXSLT">
<classpath>
<pathelement path="${build.home}"/>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${build.home}/RunXSLT/${XmlInput}"/>
<arg value="file:${build.home}/RunXSLT/${Xslfile}"/>
<arg value="${build.home}/RunXSLT/${outputFile}"/>
</java>
</target>
<!-- ==================== pubchan Target ================================ -->
<!--
The "pubchan" target runs the ChannelPublisher tool.
Channel definitions are defined in XML files. Each
channel definition is published or modified if one
already existed with the same functional name. You
can publish all the channel definitions at once or just
one at a time.
Examples:
ant pubchan -Dchannel=all
ant pubchan -Dchannel=daily-business-cartoon.xml
-->
<target name="pubchan" description="Publishes channels" depends="compile">
<echo message="Invoking Channel Publisher Tool"/>
<property name="channel" value="all"/>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.tools.chanpub.ChannelPublisher">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="-n"/>
<arg value="${channel}"/>
</java>
</target>
<!-- ===================== deployPortletApp Target ========================= -->
<!--
The "deployPortletApp" target runs the portlet Deployer tool.
This tool takes a portlet WAR file, rewrites the web.xml file
and deploys the results to the servlet container. You can deploy
multiple portlets at once by placing them in the lib/portlets
directory and specifying "all" as the porletApp.
Examples:
ant deployPortletApp -DportletApp=all
ant deployPortletApp -DportletApp=C:/TEMP/myPortlet.war
-->
<target name="deployPortletApp" description="Deploys a portlet application" depends="compile">
<echo message="Invoking Portlet Application Deployment Tool"/>
<fail unless="portletApp">deployPortletApp Ant target requires the name of the portlet app to deploy.
Here it was invoked with the portletApp property not set.
It therefore is failing after having done nothing.
Execute the help target ('ant help') for help on this and other targets in the uPortal build.
</fail>
<java fork="true" failonerror="true" dir="${basedir}" classname="org.jasig.portal.container.deploy.Deployer">
<classpath>
<pathelement path="${build.home}/WEB-INF/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="${deploy.home}/.."/>
<arg value="${portletApp}"/>
</java>
</target>
<target name="hsql" description="Start a HSQLDB instance consistent with the default RDBMS requirements of uPortal">
<echo message="Starting HSQL"/>
<echo message="Using: ${basedir}/data/uP2_uPortal"/>
<java fork="true" maxmemory="256M" dir="${basedir}" classname="org.hsqldb.Server">
<classpath>
<path refid="compile.classpath"/>
</classpath>
<arg value="-database"/>
<arg value="${basedir}/data/uP2_uPortal"/>
<arg value="-port"/>
<arg value="8887"/>
</java>
</target>
</project>
#
# Modify this file to suit your environment.
# The values of these properties will
# override the values of properties of the
# same name in the build.xml file.
#
# See build.xml for versions and descriptions
# of each of the required JAR files.
#
# Use forward slashes for path names even if
# you are in a Windows environment!
#
#==================== File and Directory Names ========================
app.name=uPortal
app.version=2.6.0
lib.path=lib
# path to tomcat binaries
server.home=/local/software/apache-tomcat-5.5.23
# path to tomcat servlet container (defaults to same directory as the tomcat
binaries)
server.base=${server.home}
webapp.docBase=uPortal
webapp.path=/${webapp.docBase}
# With Tomcat (at least) you can make uPortal the default application by
setting webapp.docBase to ROOT
# and webapp.path to nothing
# (and removing the webapps/ROOT directory that came with the Tomcat
distribution)
#webapp.docBase=ROOT
#webapp.path=
deploy.home=${server.base}/webapps/${webapp.docBase}
# the name of the prototype context file for Tomcat
# webapp.contextFile=uPortal.xml
# prototype context file for use with Tomcat 5.5
#
# 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 will install whatever .jars you place into the
/lib/container-common
# directory into Tomcat's /common/lib directory. If you place your database
driver .jar into /lib/container-common,
# then the 'deploy' target in the Ant build will install that .jar into
# into Tomcat 5.5 /common/lib. Alternatively, you can of course install your
database driver jar manually.
#
webapp.contextFile=uPortal55.xml
#==================== Compilation Control Options =====================
compile.debug=true
compile.deprecation=false
compile.optimize=true
#==================== Automated tests output configuration ============
#Uncomment property "tests.xmlFormat=true" to instruct the runtests Ant target
#to produce XML-formatted test run reports into ${dist.home}/testresults
#tests.xmlFormat=true
#==================== External Dependencies ===========================
# The build process "discovers" dependencies in certain "magic" directories.
# The default locations and contents of these directories and how the buiild
process treats them
# are documented in /docs/depdencies .
# Optionally, you can declare the locations of these directories, allowing you
to override their default locations.
# None of the following properties are actually necessary. build.xml provides
out-of-the-box-working defaults.
#lib.compile=./lib/compile
#lib.container-common=./lib/container-common
#lib.container-common-endorsed=./lib/container-common-endorsed
#lib.container-shared=./lib/container-shared
#lib.portlets=./lib/portlets
#lib.provided=./lib/provided
#lib.runtime=./lib/runtime
#lib.test=./lib/test