Commit c15a6a22 authored by Guus der Kinderen's avatar Guus der Kinderen Committed by daryl herzmann

OF-546: Drop Apache Ant in favor of Apache Maven. (#1062)

* OF-546: Drop Apache Ant in favor of Apache Maven.

This commit removes support for Apache Ant, and replaces (some, not all)
references with references to Apache Maven.

* OF-546: Remove bundled libraries for plugins.

This removes all bundled binary libraries from plugins that can be build with Maven instead of Ant.
parent 9d56c932
...@@ -2,14 +2,5 @@ sudo: false ...@@ -2,14 +2,5 @@ sudo: false
language: java language: java
jdk: jdk:
- oraclejdk8 - oraclejdk8
env: script: mvn clean verify
global:
- ANT_OPTS='-Xmx1G'
matrix:
- SCRIPT="ant -Dhalt.on.plugin.error=true -f build/build.xml clean compile"
- SCRIPT="ant -Dhalt.on.plugin.error=true -f build/build.xml clean test"
- SCRIPT="ant -Dhalt.on.plugin.error=true -f build/build.xml clean openfire"
- SCRIPT="ant -Dhalt.on.plugin.error=true -f build/build.xml clean plugins"
- SCRIPT="mvn clean verify"
script: $SCRIPT
install: true install: true
FROM openjdk:8-jdk FROM openjdk:8-jdk
COPY . /usr/src COPY . /usr/src
RUN apt-get update -qq \ RUN apt-get update -qq \
&& apt-get install -qqy ant \ && apt-get install -qqy maven \
&& cd /usr/src \ && cd /usr/src \
&& ant -Dhalt.on.plugin.error=true -Dno.package=true -f build/build.xml dist.bin && mvn package
FROM openjdk:8-jre FROM openjdk:8-jre
COPY --from=0 /usr/src/target/release/openfire /usr/local/openfire COPY --from=0 /usr/src/target/release/openfire /usr/local/openfire
......
...@@ -5,16 +5,16 @@ all: build-openfire ...@@ -5,16 +5,16 @@ all: build-openfire
# Can not use 'build' as target name, because there is a # Can not use 'build' as target name, because there is a
# directory called build # directory called build
build-openfire: build-openfire:
cd build && ant mvn package
clean: clean:
cd build && ant clean mvn clean
dpkg: dist:
cd build && ant installer.debian mvn package
plugins: plugins:
cd build && ant plugins mvn package
eclipse: .settings .classpath .project eclipse: .settings .classpath .project
......
#
#
#
# Directory where the jar files will be deployed (see the deployjar task)
#
deploy.jar.dir=
#
# Directory where plugin development is done. This is assumed to be the
# root directory:
#
# /home/joeuser/java/myplugins/ <- Point to this directory
# |- fooplugin/
# |- barplugin/
#
plugin.dev.dir=
#
# Path to your Install4j installation. Typically this is c:\Program Files\install4j
# This property is set by default in the build.xml file as c:\Program Files\install4j so
# if you used the standard location you won't need to edit the property below.
#
# installer.install4j.home=
#
# Path to a bundled JRE you wish to use with the installer.rpm ant target
#
jre.bundle.location=
\ No newline at end of file
<?xml version="1.0"?>
<!--
This software is published under the terms of the Apache License, Version 2.0,
a copy of which is included in this distribution.
-->
<!--
Build Requirements:
* Ant 1.7.1 or higher (including optional tasks)
* JDK 1.8 or higher
* jUnit in your Ant or Java classpath
-->
<project name="Openfire XMPP Server" default="openfire" basedir="..">
<description>
Openfire build script.
</description>
<!-- ======================================================================================= -->
<!-- GLOBAL PROPERTIES -->
<!-- ======================================================================================= -->
<property name="version.major" value="4"/>
<property name="version.minor" value="3"/>
<property name="version.revision" value="0"/>
<property name="version.extra" value="alpha"/> <!-- For 'beta' or 'alpha' -->
<property name="javac.source" value="1.8"/>
<property name="javac.target" value="1.8"/>
<property name="dist.prefix" value="openfire"/>
<property file="${basedir}/build/build.properties"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="src.java.dir" value="${src.dir}/java"/>
<property name="src.i18n.dir" value="${src.dir}/i18n"/>
<property name="src.test.dir" value="${src.dir}/test"/>
<property name="src.test.java.dir" value="${src.test.dir}/java"/>
<property name="docs.dir" value="${basedir}/documentation"/>
<property name="web.dir" value="${src.dir}/web"/>
<property name="spank.dir" value="${src.dir}/spank"/>
<property name="lib.ant.dir" value="${basedir}/build/lib/ant"/>
<property name="lib.build.dir" value="${basedir}/build/lib"/>
<property name="lib.build.installer.dir" value="${basedir}/build/installer"/>
<property name="lib.merge.dir" value="${lib.build.dir}/merge"/>
<property name="lib.dist.dir" value="${lib.build.dir}/dist"/>
<property name="lib.web.dir" value="${web.dir}/WEB-INF/lib"/>
<property name="i18n.basename" value="openfire_i18n"/>
<property name="i18n.default.locale" value="en"/>
<property name="work.dir" value="${basedir}/work"/>
<property name="temp.build.dir" value="${work.dir}/tempbuild"/>
<property name="target.i18n.dir" value="${temp.build.dir}/i18n"/>
<property name="target.dir" value="${basedir}/target"/>
<property name="target.openfireHome" value="${target.dir}/openfire"/>
<property name="compile.dir" value="${work.dir}/classes"/>
<property name="jar.name" value="openfire.jar"/>
<property name="jar.starter.name" value="startup.jar"/>
<property name="jar.dest.dir" value="${work.dir}/lib"/>
<property name="resources.dir" value="${src.dir}/resources"/>
<property name="overlay.dir" value="${basedir}/custom"/>
<property name="overlay.src.dir" value="${overlay.dir}/source"/>
<property name="overlay.web.dir" value="${overlay.dir}/webapp"/>
<property name="overlay.lib.dir" value="${overlay.dir}/lib"/>
<property name="overlay.conf.dir" value="${overlay.dir}/conf"/>
<property name="overlay.i18n.dir" value="${overlay.dir}/i18n"/>
<property name="overlay.resources.dir" value="${overlay.dir}/resources"/>
<property name="overlay.compile.dir" value="${work.dir}/overlay/classes"/>
<property name="javadoc.src.dir" value="${src.dir}/javadoc"/>
<property name="javadoc.dest.dir" value="${work.dir}/javadoc"/>
<property name="jspc.jsp.src.dir" value="${work.dir}/jspc/jsp"/>
<property name="jspc.dest.dir" value="${work.dir}/jspc"/>
<property name="jspc.java.dest.dir" value="${work.dir}/jspc/java"/>
<property name="jspc.classes.dest.dir" value="${work.dir}/jspc/classes"/>
<property name="jspc.jar.name" value="admin-jsp.jar"/>
<property name="test.dest.dir" value="${work.dir}/test"/>
<property name="test.classes.dest.dir" value="${test.dest.dir}/classes"/>
<property name="test.resources.dest.dir" value="${test.dest.dir}/resources"/>
<property name="test.results.dest.dir" value="${test.dest.dir}/results"/>
<property name="plugin.src.dir" value="${src.dir}/plugins"/>
<property name="plugin.dev.dir" value=""/>
<!-- Set by a developer as alt plugin location -->
<property name="plugin.dev.dest.dir" value="${work.dir}/plugins-dev"/>
<property name="plugin.dest.dir" value="${work.dir}/plugins"/>
<property name="nonrelease.plugin.dir" value="${basedir}/plugins-tmp"/>
<property name="halt.on.plugin.error" value="true"/>
<property name="webapp.dest.dir" value="${work.dir}/webapp"/>
<property name="release.dest.dir" value="${target.dir}/release"/>
<property name="package.dest.dir" value="${release.dest.dir}"/>
<property name="overwrite" value="false"/>
<property name="deploy.jar.dir" value="${jar.dest.dir}"/>
<property name="anttools.src.dir" value="${src.dir}/tools"/>
<property name="anttools.target.dir" value="${work.dir}/tools"/>
<property name="copy.dbscripts" value="true"/>
<property name="installer.install4j.home" value="/home/bamboo/install4j"/>
<property name="installer.src" value="${basedir}/build/installer"/>
<property name="installer.dest.dir" value="${release.dest.dir}"/>
<property name="installer.install4j.srcfile" value="${installer.src}/openfire.install4j"/>
<property name="installer.app_name" value="Openfire"/>
<property name="installer.app_short_name" value="openfire"/>
<property name="installer.product_name" value="openfire"/>
<property name="installer.application_id" value="6886-9911-0474-3571"/>
<property name="installer.unix_install_dir" value="openfire"/>
<property name="installer.windows_install_dir" value="Openfire"/>
<property name="installer.publisher" value="Ignite Realtime RTC Community"/>
<property name="installer.publisher_url" value="www.igniterealtime.org"/>
<property name="installer.file_prefix" value="${installer.app_short_name}"/>
<property name="installer.release_root_path" value="${release.dest.dir}"/>
<property name="license.file.path" value="${docs.dir}/dist"/>
<!-- For auto-running and debugging -->
<property name="debug" value="false"/>
<path id="ant.dependencies">
<fileset dir="${lib.ant.dir}" includes="*.jar" />
<fileset dir="${ant.home}/lib" includes="ant.jar" />
</path>
<!-- Reference DTDs and XSDs on the classpath, to prevent them from being looked up online. -->
<xmlcatalog id="dtds">
<!-- Provided on the classpath (by Jetty/Jasper) -->
<entity publicId="http://java.sun.com/xml/ns/j2ee" location="javax/servlet/jsp/resources/jsp_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_1.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_2.xsd"/>
<entity publicId="http://xmlns.jcp.org/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_3.xsd"/>
<entity publicId="http://java.sun.com/JSP/Page" location="javax/servlet/jsp/resources/jspxml_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/j2ee" location="javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd"/>
<dtd publicId="http://java.sun.com/JSP/Page" location="javax/servlet/jsp/resources/jspxml_2_0.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" location="javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"/>
<!-- Provided in the lib folder -->
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" location="${lib.ant.dir}/web-app_2_3.dtd"/>
</xmlcatalog>
<!-- ======================================================================================= -->
<!-- GLOBAL TASKDEFs -->
<!-- ======================================================================================= -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath refid="ant.dependencies" />
</taskdef>
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
<classpath refid="ant.dependencies" />
</taskdef>
<taskdef name="propertymerge" classname="org.jugbb.ant.propertymerge.PropertyMergeTask">
<classpath refid="ant.dependencies" />
</taskdef>
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath refid="ant.dependencies" />
</taskdef>
<!-- ======================================================================================= -->
<!-- PATHs / PATTERNSETs / FILTERSETs -->
<!-- ======================================================================================= -->
<available type="dir" file="${overlay.dir}" property="overlay.dir.found"/>
<available type="dir" file="${overlay.src.dir}" property="overlay.src.dir.found"/>
<available type="dir" file="${overlay.web.dir}" property="overlay.web.dir.found"/>
<available type="dir" file="${overlay.lib.dir}" property="overlay.lib.dir.found"/>
<available type="dir" file="${overlay.conf.dir}" property="overlay.conf.dir.found"/>
<available type="dir" file="${overlay.i18n.dir}" property="overlay.i18n.dir.found"/>
<available type="dir" file="${overlay.resources.dir}" property="overlay.resources.dir.found"/>
<!-- When overlay is used the content of "lib.merge.dir" needs to be combined with the content of "overlay.lib.dir"
Here, "libs.to.merge" is created which will always refer to the correct combination. "libs.to.merge" should be
used instead of "lib.merge.dir" and/or "overlay.lib.dir" from this point onwards.
-->
<if>
<equals arg1="${overlay.lib.dir.found}" arg2="true"/>
<then>
<path id="libs.to.merge">
<fileset dir="${lib.merge.dir}" includes="**/*.jar"/>
<fileset dir="${overlay.lib.dir}" includes="**/*.jar"/>
</path>
</then>
<else>
<path id="libs.to.merge">
<fileset dir="${lib.merge.dir}" includes="**/*.jar"/>
</path>
</else>
</if>
<path id="javadoc.dependencies">
<fileset dir="${lib.build.dir}" includes="*.jar" excludes="junit.jar"/>
<path refid="libs.to.merge" />
<fileset dir="${lib.dist.dir}" includes="mail.jar, jdic.jar"/>
<fileset dir="${lib.dist.dir}" includes="bcpg-jdk15on.jar, bcpkix-jdk15on.jar, bcprov-jdk15on.jar"/>
</path>
<path id="compile.dependencies">
<path refid="ant.dependencies"/>
<path refid="javadoc.dependencies"/>
</path>
<path id="jspc.dependencies">
<path refid="compile.dependencies"/>
<path refid="ant.dependencies"/>
<fileset dir="${lib.web.dir}" includes="*.jar"/>
</path>
<path id="test.dependencies">
<path refid="compile.dependencies"/>
<fileset dir="${jar.dest.dir}" includes="${jar.name}"/>
<fileset dir="${lib.build.dir}" includes="junit.jar"/>
<fileset dir="${lib.build.dir}" includes="hamcrest-core.jar"/>
<fileset dir="${lib.dist.dir}" includes="slf4j-log4j12.jar"/>
<!-- <fileset dir="${ant.home}/lib" includes="clover.jar" /> -->
</path>
<path id="plugin.dependencies">
<path refid="javadoc.dependencies"/>
<fileset dir="${jar.dest.dir}" includes="${jar.name}"/>
</path>
<patternset id="compile.sources">
<include name="**/*.java"/>
</patternset>
<patternset id="test.sources">
<include name="**/*Test.java"/>
<exclude name="**/CheckChainTrustedTest.java" if="skipResourceIntensiveTests"/>
</patternset>
<patternset id="web.sources">
<include name="**/*.jsp"/>
<include name="**/*.jar"/>
<include name="**/*.tld"/>
<include name="**/*.jspf"/>
<include name="**/*.html"/>
<include name="**/*.css"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="**/favicon.ico"/>
<include name="**/*.js"/>
</patternset>
<presetdef name="of.javac">
<javac encoding="utf8" source="${javac.source}" target="${javac.target}" includeAntRuntime="no" debug="on"/>
</presetdef>
<!-- ======================================================================================= -->
<!-- TARGETs -->
<!-- ======================================================================================= -->
<!-- git.revision =========================================================
http://stackoverflow.com/questions/2974106
-->
<available file=".git" type="dir" property="git.present"/>
<target name="git.revision" description="Store git revision in ${repository.version}" if="git.present">
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="rev-parse"/>
<arg value="--short"/>
<arg value="HEAD"/>
</exec>
<condition property="repository.version" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
</and>
</condition>
<echo message="repository.version set to '${repository.version}'" />
</target>
<!-- init ================================================================================== -->
<target name="init">
<!-- Check for min build requirements -->
<condition property="ant.not.ok" value="true">
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
<condition property="java.not.ok" value="true">
<not>
<or>
<contains string="${ant.java.version}" substring="1.7"/>
<contains string="${ant.java.version}" substring="1.8"/>
<contains string="${ant.java.version}" substring="1.9"/>
</or>
</not>
</condition>
<fail if="ant.not.ok" message="Must use Ant 1.7.1 or higher to build Openfire"/>
<fail if="java.not.ok" message="Must use JDK 1.8 or higher to build Openfire"/>
<tstamp/>
<tstamp>
<format property="builddate" pattern="MM/dd/yyyy"/>
</tstamp>
<tstamp>
<format property="dailybuild.tstamp" pattern="yyyy-MM-dd" locale="en"/>
</tstamp>
<mkdir dir="${work.dir}"/>
<!-- Setup the full version property correctly -->
<if>
<equals arg1="${version.extra}" arg2=""/>
<then>
<property name="version"
value="${version.major}.${version.minor}.${version.revision}"/>
<property name="version.filename"
value="${version.major}_${version.minor}_${version.revision}"/>
</then>
<else>
<property name="version"
value="${version.major}.${version.minor}.${version.revision}.${version.extra}"/>
<property name="version.filename"
value="${version.major}_${version.minor}_${version.revision}_${version.extra}"/>
</else>
</if>
</target>
<!-- compile =============================================================================== -->
<target name="compile" depends="init" description="Compiles Openfire app code">
<mkdir dir="${compile.dir}"/>
<of.javac destdir="${compile.dir}">
<src path="${src.java.dir}"/>
<patternset refid="compile.sources"/>
<classpath refid="compile.dependencies"/>
</of.javac>
<!-- The Ant 'javac' tasks does not allow one to use more than one source directory and simultaneously exclude
duplicates from one. As a work-around, the overlay-sources are compiled in a second iteration, overwriting
any compiled files from the first iteration.
-->
<if>
<equals arg1="${overlay.src.dir.found}" arg2="true"/>
<then>
<mkdir dir="${overlay.compile.dir}"/>
<of.javac destdir="${overlay.compile.dir}">
<src path="${overlay.src.dir}"/>
<patternset refid="compile.sources"/>
<classpath>
<path location="${compile.dir}"/>
<path refid="compile.dependencies"/>
</classpath>
</of.javac>
<!-- By copying/overwriting overlays directly into compile.dir, all tasks executed after this one need
not consider both compile.dir and overlay.compile.dir (which simplifies further tasks considerably).
-->
<copy todir="${compile.dir}" overwrite="true">
<fileset dir="${overlay.compile.dir}"/>
</copy>
</then>
</if>
</target>
<!-- i18n ================================================================================== -->
<!-- Note, this is a "private" target - no need to call it externally -->
<target name="-i18n">
<mkdir dir="${target.i18n.dir}"/>
<if>
<equals arg1="${overlay.i18n.dir.found}" arg2="true"/>
<then>
<!-- Overlay files exist for i18n: append/override the files that ship with Openfire. -->
<foreach target="-i18n-overlay" param="i18n-propertyfile">
<path>
<fileset dir="${src.i18n.dir}">
<include name="${i18n.basename}*.properties"/>
</fileset>
</path>
</foreach>
</then>
<else>
<!-- No overlay for i18n: simply copy all files. -->
<copy todir="${target.i18n.dir}">
<fileset dir="${src.i18n.dir}" includes="*.properties"/>
</copy>
</else>
</if>
<!--
Java has trouble reading translations from UTF-8 files. To work around that,
this plugin ensures that Java-compatible encoding is used.
See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
-->
<native2ascii encoding="UTF8" src="${target.i18n.dir}" dest="${target.i18n.dir}/encoded" />
<move todir="${target.i18n.dir}" overwrite="true">
<fileset dir="${target.i18n.dir}/encoded"/>
</move>
<!-- Auto generates a default base i18n file -->
<copy file="${target.i18n.dir}/${i18n.basename}_${i18n.default.locale}.properties"
tofile="${target.i18n.dir}/${i18n.basename}.properties"/>
</target>
<!-- Note, this is a "private" target - no need to call it externally -->
<target name="-i18n-overlay">
<basename property="filename" file="${i18n-propertyfile}"/>
<if>
<available file="${overlay.i18n.dir}/${filename}"/>
<then>
<propertymerge
inputpropertyfile="${src.i18n.dir}/${filename}"
mergepropertyfile="${overlay.i18n.dir}/${filename}"
outputpropertyfile="${target.i18n.dir}/${filename}"
ignoreMissingMergeFile="true" />
</then>
<else>
<copy file="${src.i18n.dir}/${filename}" tofile="${target.i18n.dir}/${filename}"/>
</else>
</if>
</target>
<target name="plugins-dev" depends="anttasks">
<!-- Setup Openfire -->
<ant antfile="${basedir}/build/build.xml" dir="${basedir}" target="openfire"
inheritAll="false" inheritRefs="false"/>
<copy file="${java.home}/../lib/tools.jar" todir="${jar.dest.dir}"></copy>
<!-- Retrieve each plugin -->
<!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make.
<subdirinfo dir="${plugin.src.dir}" property="dirlist" ifexists="plugin.xml" except="admin"/>
<for list="${dirlist}" param="plugin" trim="true">
<sequential>
<xmltask source="${plugin.src.dir}/@{plugin}/plugin.xml" dest="${plugin.src.dir}/@{plugin}/plugins2.xml">
<xmlcatalog refid="dtds"/>
<insert path="/plugin/minOpenfireVersion[last()]" position="after">
<![CDATA[
<development>
<webRoot>
${java.home}
</webRoot>
<classesDir>
XXXXXXXXX
</classesDir>
</development>
]]>
</insert>
</xmltask>
<jar jarfile="c:\\test\\@{plugin}.jar">
<fileset dir="${plugin.src.dir}/@{plugin}" includes="*.xml"/>
</jar>
</sequential>
</for>
-->
</target>
<!-- openfire =================================================================================== -->
<target name="openfire" depends="compile, jspc, -i18n"
description="Compiles and generates runnable target/openfire folder">
<mkdir dir="${jar.dest.dir}"/>
<!-- Make main Openfire jar -->
<jar jarfile="${jar.dest.dir}/${jar.name}" index="true" duplicate="preserve">
<fileset dir="${compile.dir}" includes="**/*.class" excludes="org/jivesoftware/openfire/starter/ServerStarter*.class,org/jivesoftware/openfire/launcher/*.class"/>
<fileset dir="${target.i18n.dir}" includes="*.properties"/>
<fileset dir="${overlay.resources.dir}/jar" includes="**" erroronmissingdir="false"/>
<fileset dir="${resources.dir}/jar" includes="**"/>
<archives>
<zips>
<path refid="libs.to.merge"/>
</zips>
</archives>
<manifest>
<attribute name="Built-By" value="Jive Software (www.igniterealtime.org)"/>
</manifest>
</jar>
<!-- Make startup jar -->
<jar jarfile="${jar.dest.dir}/${jar.starter.name}">
<fileset dir="${compile.dir}">
<include name="org/jivesoftware/openfire/starter/ServerStarter*.class"/>
<include name="org/jivesoftware/openfire/launcher/*.class"/>
<include name="org/jivesoftware/openfire/starter/JiveClassLoader*.class"/>
</fileset>
<fileset dir="${lib.build.installer.dir}/images" includes="**/*.gif"/>
<fileset dir="${lib.build.installer.dir}/images" includes="**/*.png"/>
<manifest>
<attribute name="Main-Class"
value="org.jivesoftware.openfire.starter.ServerStarter"/>
<attribute name="Built-By" value="Jive Software (www.igniterealtime.org)"/>
</manifest>
</jar>
<!-- Copy application dependent files -->
<copy todir="${jar.dest.dir}">
<fileset dir="${lib.dist.dir}" includes="*.*"/>
</copy>
<!-- Copy in JSP support -->
<copy todir="${jar.dest.dir}">
<fileset dir="${lib.build.dir}" includes="org.apache.taglibs.taglibs-standard-impl.jar"/>
<fileset dir="${lib.build.dir}" includes="org.apache.taglibs.taglibs-standard-spec.jar"/>
<fileset dir="${lib.build.dir}" includes="org.eclipse.jetty.apache-jsp.jar"/>
<fileset dir="${lib.build.dir}" includes="org.eclipse.jetty.orbit.org.eclipse.jdt.core.jar"/>
<fileset dir="${lib.build.dir}" includes="org.mortbay.jasper.apache-el.jar"/>
<fileset dir="${lib.build.dir}" includes="org.mortbay.jasper.apache-jsp.jar"/>
</copy>
<!-- Copy in jasper runtime jar -->
<copy todir="${jar.dest.dir}">
<fileset dir="${lib.build.dir}" includes="jasper-runtime.jar"/>
<fileset dir="${lib.build.dir}" includes="jasper-compiler.jar"/>
</copy>
<!-- Update/create target/openfire directory -->
<antcall target="openfireHome"/>
</target>
<!-- run =================================================================================== -->
<target name="run" description="Starts Openfire inline to the build process.">
<available file="${target.openfireHome}" type="dir" property="openfire.found"/>
<fail unless="openfire.found"
message="Can't find openfire, run 'ant openfire' or specify with -Dtarget.openfireHome."/>
<condition property="run.debug"
value="-Xdebug -Xint -server -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000">
<isset property="debug"/>
</condition>
<property name="run.spawn" value="false"/>
<java jar="${target.openfireHome}/lib/startup.jar" fork="true" spawn="${run.spawn}"
dir="${target.openfireHome}/bin">
<jvmarg line="${run.debug} -DopenfireHome=${target.openfireHome}"/>
</java>
</target>
<!-- run.test.init ========================================================================= -->
<target name="run.test.init">
<delete dir="${target.openfireHome}"/>
<property name="openfireHome.preconfigured" value="true"/>
<property name="run.spawn" value="true"/>
</target>
<!-- run.test ============================================================================== -->
<!-- Starts Openfire inline to the build process, with a clean pre-configured openfireHome -->
<target name="run.test" depends="run.test.init,openfireHome,run">
<echo>Openfire server started.</echo>
</target>
<!-- javadoc =============================================================================== -->
<target name="javadoc" depends="init" description="Produces Openfire Javadocs">
<mkdir dir="${javadoc.dest.dir}"/>
<antcall target="-javadoc-impl"/>
</target>
<target name="-javadoc-impl" unless="no.javadoc">
<!-- Starting with Java8 Javadoc checks for valid html. We disable it only for Java8 because older verions doesn't know the property -->
<condition property="javadoc.additionalparams" value="-Xdoclint:none">
<contains string="${ant.java.version}" substring="1.8"/>
</condition>
<condition property="javadoc.additionalparams" value="">
<not>
<contains string="${ant.java.version}" substring="1.8"/>
</not>
</condition>
<!-- Run javadoc over all source code -->
<javadoc
packagenames="org.jivesoftware.*, org.xmpp.*"
destdir="${javadoc.dest.dir}"
windowtitle="Openfire ${version} Javadoc"
overview="${src.java.dir}/overview.html"
failonerror="yes"
Encoding="UTF-8"
additionalparam="${javadoc.additionalparams}"
>
<sourcepath>
<path location="${src.java.dir}"/>
</sourcepath>
<doctitle>
<![CDATA[<font face="arial,helvetica,sans-serif">Openfire ${version} Javadoc</font>]]></doctitle>
<header><![CDATA[<b>Openfire ${version} Javadoc</b>]]></header>
<bottom><![CDATA[<i>Copyright &copy; 2003-2008 Jive Software.</i>]]></bottom>
<classpath>
<path refid="javadoc.dependencies"/>
</classpath>
<link offline="true" href="http://docs.oracle.com/javase/8/docs/api/"
packagelistLoc="${javadoc.src.dir}/jdk18"/>
</javadoc>
</target>
<!-- jspc ================================================================================== -->
<target name="jspc" depends="compile" description="Compiles all JSP pages in the admin console">
<mkdir dir="${jspc.dest.dir}"/>
<mkdir dir="${jspc.java.dest.dir}"/>
<mkdir dir="${jspc.classes.dest.dir}"/>
<mkdir dir="${webapp.dest.dir}"/>
<antcall target="-jspc-impl"/>
</target>
<target name="-jspc-impl" unless="no.jspc">
<!-- In a different approach to 'overlay' as compared with the 'compile' task, this task first creates a new
directory that combines of the original files, overwritten by the 'overlay' files before processing
occurs. This approach is simpler, but requires quite some disk operations (and is therefor not used in the
'compile' task).
-->
<mkdir dir="${jspc.jsp.src.dir}"/>
<copy todir="${jspc.jsp.src.dir}">
<fileset dir="${web.dir}" includes="**/*"/>
</copy>
<if>
<equals arg1="${overlay.web.dir.found}" arg2="true"/>
<then>
<copy todir="${jspc.jsp.src.dir}" overwrite="true">
<fileset dir="${overlay.web.dir}" includes="**/*"/>
</copy>
</then>
</if>
<!-- Generate .java files from the .jsp files. -->
<java classname="org.apache.jasper.JspC" fork="true">
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<pathelement path="${compile.dir}"/>
<path refid="jspc.dependencies"/>
</classpath>
<arg line="-uriroot '${jspc.jsp.src.dir}'"/>
<arg line="-d '${jspc.java.dest.dir}'"/>
<arg line="-p org.jivesoftware.openfire.admin"/>
<arg line="-webinc '${jspc.dest.dir}/web.partial.xml'"/>
</java>
<!-- Compile the .java files-->
<of.javac destdir="${jspc.classes.dest.dir}">
<include name="org/jivesoftware/openfire/admin/**/*.java"/>
<src path="${jspc.java.dest.dir}"/>
<classpath>
<pathelement path="${compile.dir}"/>
<path refid="jspc.dependencies"/>
</classpath>
</of.javac>
<!-- Update the web.xml to include the servlet and servlet mapping defs from jspc -->
<loadfile property="servlet-xml" srcFile="${jspc.dest.dir}/web.partial.xml" failonerror="false" />
<copy file="${web.dir}/WEB-INF/web.xml"
toFile="${webapp.dest.dir}/WEB-INF/web.xml"
overwrite="true">
<filterset begintoken="&lt;!--@@" endtoken="@@--&gt;">
<filter token="JSPC-SERVLETS" value="${servlet-xml}"/>
</filterset>
</copy>
<!-- When there is a web.xml in the overlay use that. -->
<if>
<available file="${overlay.web.dir}/WEB-INF/web.xml" />
<then>
<copy file="${overlay.web.dir}/WEB-INF/web.xml"
toFile="${webapp.dest.dir}/WEB-INF/web.xml"
overwrite="true">
<filterset begintoken="&lt;!--@@" endtoken="@@--&gt;">
<filter token="JSPC-SERVLETS" value="${servlet-xml}"/>
</filterset>
</copy>
</then>
</if>
<!-- Copy over other WEB-INF files. -->
<copy todir="${webapp.dest.dir}/WEB-INF" overwrite="true">
<fileset dir="${web.dir}/WEB-INF">
<include name="**/*"/>
<exclude name="web.xml"/>
</fileset>
</copy>
<!-- When there are WEB-INF overlay files, use those. -->
<if>
<equals arg1="${overlay.web.dir.found}" arg2="true"/>
<then>
<copy todir="${webapp.dest.dir}/WEB-INF" overwrite="true">
<fileset dir="${overlay.web.dir}/WEB-INF">
<include name="**/*"/>
<exclude name="web.xml"/>
</fileset>
</copy>
</then>
</if>
<!-- Create a jar of compiled servlets -->
<jar jarfile="${jspc.dest.dir}/${jspc.jar.name}">
<fileset dir="${jspc.classes.dest.dir}" includes="**/*.class"/>
</jar>
</target>
<!-- test ================================================================================== -->
<target name="test" depends="openfire" description="Compiles and runs test cases">
<!-- Compile all test code -->
<mkdir dir="${test.classes.dest.dir}"/>
<of.javac destdir="${test.classes.dest.dir}">
<src path="${src.test.java.dir}"/>
<patternset refid="test.sources"/>
<classpath>
<path refid="test.dependencies"/>
<pathelement path="${compile.dir}"/>
</classpath>
</of.javac>
<!-- Copy resources -->
<copy todir="${test.dest.dir}">
<fileset dir="${src.test.dir}" includes="resources/**/*.*"/>
</copy>
<!-- Run jUnit -->
<mkdir dir="${test.results.dest.dir}"/>
<junit printsummary="yes" haltonfailure="yes" fork="yes" dir="${test.dest.dir}" includeantruntime="false">
<sysproperty key="openfireHome" value="${target.openfireHome}"/>
<!-- We must add our own classes to the classpath for testing -->
<classpath>
<path refid="test.dependencies"/>
<pathelement path="${test.dest.dir}"/>
<pathelement path="${test.classes.dest.dir}"/>
<pathelement path="${test.resources.dest.dir}"/>
</classpath>
<formatter type="xml"/>
<batchtest todir="${test.results.dest.dir}">
<fileset dir="${src.test.java.dir}">
<patternset refid="test.sources"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- openfireHome ========================================================================== -->
<target name="openfireHome" unless="openfireHome.no.update">
<!-- Set this to true to enable a pre-setup openfireHome directory -->
<property name="openfireHome.preconfigured" value="false"/>
<property name="openfireHome.no.plugins" value="false"/>
<mkdir dir="${target.openfireHome}"/>
<!-- Copy conf dir -->
<copy todir="${target.openfireHome}">
<fileset dir="${src.dir}" includes="conf/**/*.*"></fileset>
</copy>
<if>
<equals arg1="${overlay.conf.dir.found}" arg2="true"/>
<then>
<copy todir="${target.openfireHome}" overwrite="true">
<fileset dir="${overlay.conf.dir}" includes="**/*"/>
</copy>
</then>
<else><echo>No custom config here </echo></else>
</if>
<!-- Copy database scripts -->
<if>
<equals arg1="${copy.dbscripts}" arg2="true"/>
<then>
<copy todir="${target.openfireHome}/resources">
<fileset dir="${src.dir}" includes="database/**/*.sql"></fileset>
</copy>
</then>
</if>
<!-- Copy security resources -->
<copy todir="${target.openfireHome}/resources">
<fileset dir="${src.dir}">
<include name="security/*"/>
<include name="security/*.*"/>
</fileset>
</copy>
<!-- Copy native authentication files -->
<copy todir="${target.openfireHome}/resources">
<fileset dir="${resources.dir}">
<include name="nativeAuth/**"/>
</fileset>
</copy>
<copy todir="${target.openfireHome}/resources">
<fileset dir="${overlay.resources.dir}" erroronmissingdir="false">
<include name="nativeAuth/**"/>
</fileset>
</copy>
<!-- Copy lib dir -->
<copy todir="${target.openfireHome}/lib">
<fileset dir="${jar.dest.dir}" includes="*.*"></fileset>
</copy>
<!-- Overwrite config with build/openfireHome dir, if requested -->
<if>
<equals arg1="${openfireHome.preconfigured}" arg2="true"/>
<then>
<!-- Copy pre-configured openfireHome dir -->
<copy todir="${target.openfireHome}">
<fileset dir="${basedir}/build/openfireHome" includes="**/*.*"/>
</copy>
</then>
</if>
<!-- Copy admin Plugin -->
<antcall target="adminPlugin">
<param name="plugin.dest.dir" value="${target.openfireHome}/plugins"/>
</antcall>
<antcall target="spank">
<param name="plugin.dest.dir" value="${target.openfireHome}/plugins"/>
</antcall>
<!-- Copy compiled plugins if we need to -->
<if>
<and>
<equals arg1="${openfireHome.no.plugins}" arg2="false"/>
<available file="${plugin.dest.dir}" />
</and>
<then>
<copy todir="${target.openfireHome}/plugins" failonerror="false">
<fileset dir="${plugin.dest.dir}"/>
</copy>
</then>
</if>
<!-- Copy bin dir -->
<copy todir="${target.openfireHome}">
<fileset dir="${src.dir}" includes="bin/**/*"/>
</copy>
<!-- Make stuff under bin executable -->
<chmod perm="+x">
<fileset dir="${target.openfireHome}/bin" includes="**/*">
<exclude name="**/*.bat"/>
<exclude name="**/*.rc"/>
<exclude name="**/*-sysconfig"/>
</fileset>
</chmod>
<fixcrlf srcdir="${target.openfireHome}/bin" eol="lf" eof="remove" includes="*.sh,extra/*"/>
<!-- Create a logs dir in the binary release -->
<mkdir dir="${target.openfireHome}/logs"/>
</target>
<!-- adminPlugin =========================================================================== -->
<target name="adminPlugin">
<!-- Copy admin plugin source (if any) -->
<copy todir="${plugin.dest.dir}">
<fileset dir="${src.dir}/plugins" includes="admin/*.*"/>
</copy>
<!-- Copy admin plugin resources -->
<copy todir="${plugin.dest.dir}/admin/webapp">
<!-- All web resources minus jsp's and jspf's - those are precompiled -->
<fileset dir="${web.dir}">
<patternset refid="web.sources"/>
<exclude name="**/*.jsp"/>
<exclude name="**/*.jspf"/>
</fileset>
</copy>
<!-- Copy admin plugin overlay resources -->
<if>
<equals arg1="${overlay.web.dir.found}" arg2="true"/>
<then>
<copy todir="${plugin.dest.dir}/admin/webapp" overwrite="true">
<!-- All web resources minus jsp's and jspf's - those are precompiled -->
<fileset dir="${overlay.web.dir}">
<patternset refid="web.sources"/>
<exclude name="**/*.jsp"/>
<exclude name="**/*.jspf"/>
</fileset>
</copy>
</then>
</if>
<!-- Copy other admin WEB-INF stuff -->
<copy todir="${plugin.dest.dir}/admin/webapp">
<fileset dir="${webapp.dest.dir}"/>
</copy>
<!-- Copy in pre-compiled JSP jar -->
<copy todir="${plugin.dest.dir}/admin/webapp/WEB-INF/lib" overwrite="${overwrite}">
<fileset dir="${jspc.dest.dir}" includes="${jspc.jar.name}"/>
</copy>
</target>
<target name="spank">
<mkdir dir="${target.openfireHome}/resources/spank"/>
<copy todir="${target.openfireHome}/resources/spank">
<!-- All web resources minus jsp's and jspf's - those are precompiled -->
<fileset dir="${spank.dir}">
<patternset refid="web.sources"/>
<exclude name="**/*.jsp"/>
<exclude name="**/*.jspf"/>
<include name="**/*.xml"/>
<include name="**/*.swf"/>
</fileset>
</copy>
</target>
<!-- dist.init ============================================================================== -->
<target name="dist.init" >
<!-- ie: openfire_src -->
<property name="release.name.src" value="${dist.prefix}_src"/>
<!-- ie: openfire_src_2_1_2 -->
<property name="release.fullname.src" value="${dist.prefix}_src_${version.filename}"/>
<property name="package.dest.filename.zip" value="${package.dest.dir}/${release.fullname.src}.zip" />
<property name="package.dest.filename.tar" value="${package.dest.dir}/${release.fullname.src}.tar" />
<property name="package.dest.filename.tar.gz" value="${package.dest.filename.tar}.gz" />
<property name="release.src.out.dir" value="${release.dest.dir}/${release.name.src}"/>
<!-- ie: openfire -->
<property name="release.name" value="${dist.prefix}"/>
<!-- ie: openfire_2_1_2 -->
<property name="release.fullname" value="${dist.prefix}_${version.filename}"/>
<property name="release.out.dir" value="${release.dest.dir}/${release.name}"/>
</target>
<target name="clean.dist.folders" depends="init, dist.init">
<!-- Removes the expanded release folders, makes for easier automation of builds -->
<delete dir="${release.src.out.dir}"/>
<delete dir="${release.out.dir}"/>
</target>
<!-- dist.src =============================================================================== -->
<target name="dist.src" depends="init, dist.init, javadoc, -i18n"
description="Creates a source distribution package">
<mkdir dir="${release.dest.dir}"/>
<!-- Create a new prop for the final release dirs then create the dirs -->
<mkdir dir="${release.src.out.dir}"/>
<!-- Copy dist docs, use filtering -->
<copy todir="${release.src.out.dir}">
<fileset dir="${docs.dir}/dist" includes="*.*" excludes="LICENSE.html"/>
<filterset>
<filter token="builddate" value="${builddate}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Copy the license -->
<copy todir="${release.src.out.dir}" file="${license.file.path}/LICENSE.html"/>
<!-- Copy text docs -->
<copy todir="${release.src.out.dir}/documentation">
<fileset dir="${docs.dir}" includes="**/*.html,**/*.txt"/>
<filterset>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Copy rest of docs -->
<copy todir="${release.src.out.dir}/documentation">
<fileset dir="${docs.dir}" excludes="**/*.html,**/*.txt"/>
</copy>
<!-- Copy Javadocs -->
<copy todir="${release.src.out.dir}/documentation/docs/javadoc">
<fileset dir="${javadoc.dest.dir}"/>
</copy>
<!-- Copy non-java source -->
<copy todir="${release.src.out.dir}/src">
<fileset dir="${src.dir}" excludes="**/*.java"/>
</copy>
<!-- Copy java source, stripping non-distributable files and replacing DATE strings -->
<copy todir="${release.src.out.dir}/src">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<filterset>
<filter token="DATE" value="${builddate}"/>
</filterset>
</copy>
<if>
<available file="${work.dir}/plugins-dev/enterprise/target/lib" />
<then>
<copy todir="${release.src.out.dir}/src/plugins/enterprise/lib" failonerror="false">
<fileset dir="${work.dir}/plugins-dev/enterprise/target/lib">
<include name="*-lib.jar" />
</fileset>
</copy>
</then>
</if>
<!-- Copy the i18n files to the resources dir. This way they won't be in the jar only -->
<copy todir="${release.src.out.dir}/resources/i18n">
<fileset dir="${target.i18n.dir}" includes="*.properties"/>
</copy>
<!-- Copy build -->
<copy todir="${release.src.out.dir}/build">
<fileset dir="${basedir}/build"/>
</copy>
<if>
<not>
<isset property="no.package"/>
</not>
<then>
<parallel>
<!-- Source Packages -->
<zip zipfile="${package.dest.filename.zip}"
basedir="${release.src.out.dir}/.."
includes="${release.fullname.src}/**/*, ${release.name.src}/**/*"
/>
<tar tarfile="${package.dest.filename.tar.gz}"
basedir="${release.src.out.dir}/.."
includes="${release.fullname.src}/**/*, ${release.name.src}/**/*"
compression="gzip"
longfile="gnu"
/>
</parallel>
</then>
</if>
</target>
<!-- dist.bin =============================================================================== -->
<target name="dist.bin" depends="init, dist.init, plugins, javadoc, enterprise"
description="Creates a binary distribution package">
<mkdir dir="${release.out.dir}"/>
<!-- Make & copy the search plugin. -->
<copy todir="${release.out.dir}">
<fileset dir="${work.dir}">
<include name="plugins/search.jar"/>
</fileset>
</copy>
<!-- Copy all prepare dirs to the binary dist -->
<antcall target="openfireHome">
<param name="target.openfireHome" value="${release.out.dir}"/>
<param name="openfireHome.no.plugins" value="true"/>
</antcall>
<!-- Remove the development scripts -->
<delete file="${release.out.dir}/bin/openfire-dev.bat"/>
<delete file="${release.out.dir}/bin/openfire-dev.sh"/>
<!-- Copy dist docs, use filtering -->
<copy todir="${release.out.dir}">
<fileset dir="${docs.dir}/dist" includes="*.*" excludes="LICENSE.html"/>
<filterset>
<filter token="builddate" value="${builddate}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Copy the license -->
<copy todir="${release.out.dir}" file="${license.file.path}/LICENSE.html"/>
<mkdir dir="${release.out.dir}/logs"/>
<touch file="${release.out.dir}/logs/stderr.out"/>
<!-- Copy docs -->
<copy todir="${release.out.dir}/documentation">
<fileset dir="${docs.dir}/docs"/>
<filterset>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<copy todir="${release.out.dir}/documentation/images" filtering="false" overwrite="true">
<fileset dir="${docs.dir}/docs/images"/>
</copy>
<!-- Copy Javadocs -->
<copy todir="${release.out.dir}/documentation/javadoc">
<fileset dir="${javadoc.dest.dir}"/>
</copy>
<!-- Copy the i18n files to the resources dir. This way they won't be in the jar only -->
<copy todir="${release.out.dir}/resources/i18n">
<fileset dir="${target.i18n.dir}" includes="*.properties"/>
</copy>
<!-- Package the release -->
<property name="package.dest.dir" value="${release.dest.dir}"/>
<if>
<not>
<isset property="no.package"/>
</not>
<then>
<parallel>
<!-- Binary packages -->
<zip zipfile="${package.dest.dir}/${release.fullname}.zip"
basedir="${release.out.dir}/.."
includes="${release.fullname}/**/*, ${release.name}/**/*"/>
<tar tarfile="${package.dest.dir}/${release.fullname}.tar.gz"
basedir="${release.out.dir}/.."
includes="${release.fullname}/**/*, ${release.name}/**/*"
compression="gzip"
longfile="gnu"/>
</parallel>
</then>
</if>
</target>
<target name="enterprise" if="do.enterprise">
<!-- Copy enterprise plugins. -->
<copy todir="${release.out.dir}">
<fileset dir="${work.dir}">
<include name="plugins/enterprise.jar"/>
<include name="plugins/fastpath.jar"/>
<include name="plugins/webchat.war"/>
</fileset>
</copy>
<!-- Remove GPL libs from distribution -->
<delete file="${release.out.dir}/lib/mysql.jar"/>
</target>
<!-- dailybuild ============================================================================ -->
<target name="dailybuild" depends="init" description="Creates a daily build release">
<property name="release.out.name" value="${dist.prefix}_${dailybuild.tstamp}"/>
<property name="release.fullname" value="${release.out.name}"/>
<property name="release.src.out.name" value="${dist.prefix}_src_${dailybuild.tstamp}"/>
<property name="release.fullname.src" value="${release.src.out.name}"/>
<property name="release.out.dir"
value="${release.dest.dir}/dailybuild/${release.out.name}"/>
<property name="release.src.out.dir"
value="${release.dest.dir}/dailybuild/${release.src.out.name}"/>
<antcall target="dist.src">
<param name="release.src.out.name" value="${release.src.out.name}"/>
<param name="release.src.out.dir" value="${release.src.out.dir}"/>
<param name="package.dest.dir" value="${release.dest.dir}/dailybuild"/>
</antcall>
<antcall target="dist.bin">
<param name="release.out.name" value="${release.out.name}"/>
<param name="release.out.dir" value="${release.out.dir}"/>
<param name="package.dest.dir" value="${release.dest.dir}/dailybuild"/>
<!-- dist.src above does this already, so don't need to do it twice -->
<param name="no.javadoc" value="true"/>
</antcall>
</target>
<!-- installer ============================================================================= -->
<target name="installer" description="Creates Openfire installers">
<condition property="install4j.not.ok" value="true">
<not>
<available file="${installer.install4j.home}/bin/install4j.jar"/>
</not>
</condition>
<fail if="install4j.not.ok"
message="Path to Install4j not set, see build.properties.template file."/>
<antcall target="dist.bin">
<!-- Don't need package for installer build -->
<param name="no.package" value="true"/>
</antcall>
<antcall target="dist.src">
<!-- Already built javadoc with dist.bin above -->
<param name="no.javadoc" value="true"/>
</antcall>
<taskdef name="install4j"
classname="com.install4j.Install4JTask"
classpath="${installer.install4j.home}/bin/ant.jar"/>
<mkdir dir="${installer.dest.dir}"/>
<!-- Install4j doesn't support extra version info (like beta) correctly, so
define a special revision number. -->
<if>
<equals arg1="${version.extra}" arg2=""/>
<then>
<property name="install4j.revision" value="${version.revision}"/>
</then>
<else>
<property name="install4j.revision" value="${version.revision}.${version.extra}"/>
</else>
</if>
<install4j projectfile="${installer.install4j.srcfile}" destination="${installer.dest.dir}">
<variable name="RELEASE_DIR" value="${dist.prefix}"/>
<variable name="VERSION_MAJOR" value="${version.major}"/>
<variable name="VERSION_MINOR" value="${version.minor}"/>
<variable name="VERSION_REVISION" value="${install4j.revision}"/>
<variable name="APP_NAME" value="${installer.app_name}"/>
<variable name="APP_SHORT_NAME" value="${installer.app_short_name}"/>
<variable name="PRODUCT_NAME" value="${installer.product_name}"/>
<variable name="PUBLISHER" value="${installer.publisher}"/>
<variable name="PUBLISHER_URL" value="${installer.publisher_url}"/>
<variable name="FILE_PREFIX" value="${installer.app_short_name}"/>
<variable name="RELEASE_ROOT_PATH" value="${installer.release_root_path}"/>
<variable name="APPLICATION_ID" value="${installer.application_id}"/>
<variable name="UNIX_INSTALL_DIR" value="${installer.unix_install_dir}"/>
<variable name="WINDOWS_INSTALL_DIR" value="${installer.windows_install_dir}"/>
</install4j>
</target>
<!-- installer.rpm ========================================================
Build RPM artifiacts, set rpmbuild.arch to build non-x64, for example:
$ ant installer.rpm -Drpmbuild.arch=noarch
$ ant installer.rpm -Drpmbuild.arch=i686
-->
<property name="bundle.jre" value="true" />
<property name="target.work.subdir" value="rpm" />
<property name="target.rpm" value="${work.dir}/${target.work.subdir}" />
<property name="rpm.spec.file" value="${basedir}/build/rpm/openfire.spec"/>
<property name="rpmbuild.arch" value="x86_64" />
<tstamp>
<format property="rpm.builddate" pattern="EEE MMM dd yyyy" locale="en"/>
</tstamp>
<tstamp>
<format property="rpm.builddate2" pattern="yyyyMMdd" locale="en"/>
</tstamp>
<target name="installer.rpm" depends="init, dist.init, git.revision"
description="Builds a rpm of openfire.">
<antcall target="dist.src"/>
<!-- create empty dirs to allow rpmbuild to do its thing -->
<mkdir dir="${target.rpm}/SPECS" />
<mkdir dir="${target.rpm}/SOURCES" />
<mkdir dir="${target.rpm}/BUILD" />
<mkdir dir="${target.rpm}/SRPMS" />
<mkdir dir="${target.rpm}/RPMS" />
<!-- Setup the RPM versioning correctly, so one can update from
a alpha,beta,rc build to GA
For General Releases we get x.y.z-1
For Alpha builds we get x.y.z-0.1.{YYYYMMDD}alpha
For Beta/RC builds we get x.y.z-0.2.(beta|rc)
-->
<property name="rpmbuild.version"
value="${version.major}.${version.minor}.${version.revision}"/>
<if>
<equals arg1="${version.extra}" arg2=""/>
<then>
<property name="rpmbuild.release"
value="1"/>
</then>
<elseif>
<equals arg1="${version.extra}" arg2="alpha"/>
<then>
<property name="rpmbuild.release"
value="0.1.${rpm.builddate2}${version.extra}"/>
</then>
</elseif>
<else>
<property name="rpmbuild.release"
value="0.2.${version.extra}"/>
</else>
</if>
<copy tofile="${target.rpm}/SPECS/openfire.spec" file="${rpm.spec.file}" />
<!-- Save the user from themself, if noarch is the target arch, ignore
copying the JRE as well -->
<if>
<and>
<equals arg1="${bundle.jre}" arg2="true"/>
<not>
<equals arg1="${rpmbuild.arch}" arg2="noarch" />
</not>
</and>
<then>
<!-- Include bundled jre -->
<copy todir="${target.rpm}/SOURCES" file="${jre.bundle.location}" />
</then>
</if>
<copy todir="${target.rpm}/SOURCES/" file="${release.dest.dir}/${release.fullname.src}.tar.gz" />
<rpm specFile="openfire.spec"
topDir="${target.rpm}"
command="-ba --target ${rpmbuild.arch} --define 'JRE_BUNDLE ${jre.bundle.location}' --define 'OPENFIRE_VERSION ${rpmbuild.version}' --define 'OPENFIRE_RELEASE ${rpmbuild.release}' --define 'OPENFIRE_SOURCE ${release.fullname.src}.tar.gz' --define 'OPENFIRE_REPOVERSION ${repository.version}' --define 'OPENFIRE_BUILDDATE ${rpm.builddate}'"
failOnError="true"
/>
<!-- copy the rpmbuild result into the release directory! -->
<copy todir="${release.dest.dir}" >
<fileset dir="${target.rpm}/SRPMS" />
<fileset dir="${target.rpm}/RPMS/${rpmbuild.arch}" />
</copy>
</target>
<!-- plugins =============================================================================== -->
<target name="plugins" description="Builds all plugins" depends="anttasks">
<antcall target="clean-plugins"/>
<tstamp>
<format property="buildJavaDate" pattern="MMM dd, yyyy"/>
</tstamp>
<!-- Call jar task, can't do this is as a 'depends' call of this target because
of the way class loading works for jspc calls.
-->
<antcall target="openfire">
<param name="openfireHome.no.update" value="true"/>
</antcall>
<mkdir dir="${plugin.dest.dir}"/>
<!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make. Exclude the
admin plugin (which is created by a different Ant task) as well as the clustering plugin (which
requires non-free JAR-files to be added to its library path, which most users won't do). -->
<subdirinfo dir="${plugin.src.dir}" property="dirlist" ifexists="plugin.xml" except="admin,clustering"/>
<antcall target="-plugins-impl"/>
<!-- Update/create target/openfire directory -->
<antcall target="openfireHome"/>
</target>
<target name="-plugins-impl" if="dirlist">
<for list="${dirlist}" param="plugin" trim="true">
<sequential>
<buildplugin plugin="@{plugin}" pluginsrc="${plugin.src.dir}"/>
</sequential>
</for>
</target>
<target name="plugin" description="build one plugin">
<mkdir dir="${plugin.dest.dir}"/>
<delete dir="${plugin.dev.dest.dir}/${plugin}"/>
<delete file="${plugin.dev.dest.dir}/${plugin}.jar"/>
<delete file="${plugin.dest.dir}/${plugin}.jar"/>
<buildplugin plugin="${plugin}" pluginsrc="${plugin.src.dir}"/>
<!-- Update/create target/openfire directory -->
<antcall target="openfireHome"/>
</target>
<!-- buildplugin (MACRO) =================================================================== -->
<macrodef name="buildplugin">
<attribute name="plugin"/>
<attribute name="pluginsrc"/>
<attribute name="pluginlib" default="${plugin.dev.dest.dir}/@{plugin}/work/lib" />
<sequential>
<if>
<not>
<istrue value="${plugin.@{plugin}.skip}"/>
</not>
<then>
<trycatch property="message_ref" reference="exception_ref">
<try>
<!-- For each plugin, compile code, make a jar and copy resources. -->
<mkdir dir="${plugin.dev.dest.dir}"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/classes"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/parentlibs"/>
<xmlproperty file="${plugin.src.dir}/@{plugin}/plugin.xml" prefix="@{plugin}" keeproot="false"/>
<if>
<isset property="@{plugin}.parentPlugin"/>
<then>
<echo>Parent plugin found: ${@{plugin}.parentPlugin}</echo>
<!--<buildparentplugin parentPlug="${@{plugin}.parentPlugin}" plugin="@{plugin}" pluginsrc="@{pluginsrc}" pluginlib="@{pluginlib}"/>-->
<buildplugin plugin="${@{plugin}.parentPlugin}" pluginsrc="${plugin.src.dir}"/>
<!-- Copy parent plugin code + dependencies into our own plugin directory. -->
<echo>Parent plugin built. Copying its resources and continuing with build for child plugin.</echo>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/parentlibs">
<fileset dir="${plugin.dev.dest.dir}/${@{plugin}.parentPlugin}/target/parentlibs/" includes="**/*.jar" />
</copy>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/parentlibs">
<fileset dir="${plugin.dev.dest.dir}/${@{plugin}.parentPlugin}/target/lib/" includes="**/*.jar" />
</copy>
</then>
</if>
<path id="plugin.classpath.source">
<path refid="plugin.dependencies"/>
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/parentlibs" includes="**/*.jar"/>
<fileset dir="@{pluginsrc}/@{plugin}" includes="lib/*.jar"/>
</path>
<!-- Compile plugin source code -->
<of.javac destdir="${plugin.dev.dest.dir}/@{plugin}/target/classes" classpathref="plugin.classpath.source">
<src path="@{pluginsrc}/@{plugin}/src/java"/>
</of.javac>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/lib" />
<!-- Searchs source of a plugin and makes a <plugin>-lib.jar that contains compiled versions of all
non-distributable source -->
<mkdir dir="@{pluginlib}/source" />
<mkdir dir="@{pluginlib}/classes" />
<!-- copy the source we want to compile -->
<copy todir="@{pluginlib}/source">
<fileset dir="@{pluginsrc}/@{plugin}/src/java" includes="**/*.java" />
<filterset>
<filter token="DATE" value="${buildJavaDate}"/>
</filterset>
</copy>
<if>
<not><uptodate>
<srcfiles dir="@{pluginlib}/source" includes="**/*.java"/>
<mapper type="merge" to="@{pluginlib}/@{plugin}-lib.jar"/>
</uptodate></not>
<then>
<of.javac destdir="@{pluginlib}/classes">
<src path="@{pluginlib}/source"/>
<classpath>
<pathelement location="${plugin.dev.dest.dir}/@{plugin}/target/classes"/>
<path refid="plugin.classpath.source"/>
</classpath>
</of.javac>
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/@{plugin}-lib.jar">
<fileset dir="@{pluginlib}/classes" />
</jar>
</then>
</if>
<!-- Make the jar -->
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}.jar">
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/classes" >
<present present="srconly" targetdir="@{pluginlib}/classes"/>
</fileset>
</jar>
<delete dir="@{pluginlib}/classes" />
<delete dir="@{pluginlib}/source" />
<available file="@{pluginsrc}/@{plugin}/src/include" type="dir"
property="@{plugin}.include.exists"/>
<if>
<equals arg1="${@{plugin}.include.exists}" arg2="true"/>
<then>
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}.jar"
update="true">
<fileset dir="@{pluginsrc}/@{plugin}/src/include" includes="**/*.*"/>
</jar>
</then>
</if>
<!-- Copy anything in the plugin's lib dir to the target lib dir -->
<if>
<available file="@{pluginsrc}/@{plugin}/lib" />
<then>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/lib" failonerror="false"
overwrite="${overwrite}">
<fileset dir="@{pluginsrc}/@{plugin}/lib" includes="**/*.*"/>
</copy>
</then>
</if>
<!-- Copy web.xml to web-custom.xml -->
<if>
<available file="@{pluginsrc}/@{plugin}/src/web/WEB-INF" />
<then>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF" failonerror="false"
overwrite="${overwrite}">
<fileset dir="@{pluginsrc}/@{plugin}/src/web/WEB-INF" includes="web.xml"/>
<mapper type="glob" from="web.xml" to="web-custom.xml"/>
</copy>
</then>
</if>
<!-- Copy the plugin.xml and documentation to the target dir, code below assumes it's there -->
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/jar"/>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar" failonerror="false"
overwrite="${overwrite}">
<fileset dir="@{pluginsrc}/@{plugin}" includes="*.xml, *.html, *.gif, *.png, *.ico"/>
</copy>
<!-- Copy the database and i18n file to the target dir, if they exist. -->
<!--<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/database" failonerror="false">-->
<!--<fileset dir="@{pluginsrc}/@{plugin}/src/database"/>-->
<!--</copy>-->
<!-- JSPC any JSP pages. Do this conditionally as there might not be a web dir. -->
<available property="plugin.@{plugin}.webdocs.available"
type="dir" file="@{pluginsrc}/@{plugin}/src/web"/>
<if>
<equals arg1="${plugin.@{plugin}.webdocs.available}" arg2="true"/>
<then>
<!-- Continue with JSPC tasks... -->
<!-- Create output dir -->
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/java"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/classes"/>
<!-- Copy jsp's from plugin and web.xml from openfire to a temp dir. We'll
not fail on an error since the web dir might not exist.
-->
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/web"
overwrite="${overwrite}">
<fileset dir="@{pluginsrc}/@{plugin}/src/web">
<exclude name="WEB-INF/web.xml"/>
</fileset>
<fileset dir="${web.dir}">
<include name="WEB-INF/**/*.*"/>
<include name="META-INF/**/*.*"/>
<exclude name="WEB-INF/web.xml"/>
<exclude name="WEB-INF/classes/openfire_init.xml"/>
<exclude name="WEB-INF/tmp/**/*.*"/>
<exclude name="WEB-INF/work/**/*.*"/>
</fileset>
</copy>
<!-- JSP to Java -->
<java classname="org.apache.jasper.JspC" fork="true">
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target" includes="lib/*.jar"/>
<pathelement location="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}.jar"/>
<pathelement path="${compile.dir}"/>
<path refid="jspc.dependencies"/>
</classpath>
<arg line="-uriroot '${plugin.dev.dest.dir}/@{plugin}/target/web'"/>
<arg line="-d '${plugin.dev.dest.dir}/@{plugin}/target/jspc/java'"/>
<arg line="-p org.jivesoftware.openfire.plugin.@{plugin}"/>
<arg line="-webxml '${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml'"/>
</java>
<!-- Use xmltask to merge the generated web.xml file and a developer one (if any) -->
<available property="plugin.@{plugin}.webxml.available"
type="file" file="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml"/>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF"/>
<if>
<equals arg1="${plugin.@{plugin}.webxml.available}" arg2="true"/>
<then>
<!-- Copy the servlet and servlet-mapping elements from the original web.xml to a temp buffer.
Note: The original web.xml can only contain one servlet and servlet-mapping -->
<xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml">
<xmlcatalog refid="dtds"/>
<copy path="//web-app/servlet[last()]" buffer="foobar"/>
<copy path="//web-app/servlet-mapping[last()]" buffer="foobar2"/>
</xmltask>
<!-- Add the copied servlet and servlet-mapping elements to the generated web.xml -->
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml"
dest="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF/web.xml">
<xmlcatalog refid="dtds"/>
<insert path="/web-app/servlet[last()]" buffer="foobar"
position="after"/>
<insert path="/web-app/servlet-mapping[last()]" buffer="foobar2"
position="after"/>
</xmltask>
</then>
<else>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF"
file="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml"
overwrite="${overwrite}"/>
</else>
</if>
<!-- Compile java classes -->
<of.javac destdir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/classes">
<src path="${plugin.dev.dest.dir}/@{plugin}/target/jspc/java"/>
<classpath>
<path refid="jspc.dependencies"/>
<pathelement path="${compile.dir}"/>
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/lib" includes="*.jar"/>
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/parentlibs" includes="**/*.jar"/>
</classpath>
</of.javac>
<!-- Make a jar of compiled jsp classes -->
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}-jspc.jar">
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/classes"
includes="**/*.class"/>
</jar>
</then>
</if>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar" overwrite="true">
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target">
<include name="lib/*.jar"/>
<include name="web/WEB-INF/web.xml"/>
<include name="web/WEB-INF/web-custom.xml"/>
</fileset>
</copy>
<!-- Copy everything else to Openfire's plugin dir -->
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar" overwrite="true">
<fileset dir="@{pluginsrc}/@{plugin}">
<include name="classes/**/*.*"/>
</fileset>
<fileset dir="@{pluginsrc}/@{plugin}/src">
<include name="database/**/*.sql"/>
<include name="i18n/*.properties"/>
<include name="web/**/*.*"/>
<include name="**/*"/>
<exclude name="web/WEB-INF/web.xml"/>
<exclude name="web/**/*.jsp"/>
<exclude name="web/**/*.jspf"/>
<exclude name="java/**/*.java"/>
</fileset>
</copy>
<!-- Jar the plugin -->
<jar jarfile="${plugin.dest.dir}/@{plugin}.jar">
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/jar"/>
</jar>
<!-- Delete the exploded plugin -->
<delete dir="${plugin.dev.dest.dir}/@{plugin}/jar"/>
<!-- Plugin is done! No need to rebuilt it within the same Ant task -->
<property name="plugin.@{plugin}.skip" value="true"/>
</try>
<catch>
<property name="exception" refid="exception_ref" />
<property name="message" value="Error building plugin: @{plugin}. Exception:${line.separator}${exception}" />
<echo message="${message}" />
<fail message="${message}">
<condition>
<istrue value="${halt.on.plugin.error}"/>
</condition>
</fail>
</catch>
</trycatch>
</then>
</if>
</sequential>
</macrodef>
<!-- anttasks ============================================================================== -->
<target name="anttasks" depends="init">
<mkdir dir="${anttools.target.dir}"/>
<mkdir dir="${anttools.target.dir}/classes"/>
<of.javac destdir="${anttools.target.dir}/classes" includeAntRuntime="yes">
<src path="${anttools.src.dir}"/>
<patternset refid="compile.sources"/>
<classpath>
<path refid="compile.dependencies"/>
</classpath>
</of.javac>
<jar jarfile="${anttools.target.dir}/ant-subdirtask.jar">
<fileset dir="${anttools.target.dir}/classes" includes="**/*.class"/>
</jar>
<taskdef name="subdirinfo" classname="org.jivesoftware.ant.SubDirInfoTask">
<classpath>
<pathelement location="${anttools.target.dir}/ant-subdirtask.jar"/>
</classpath>
</taskdef>
</target>
<!-- clean ================================================================================= -->
<target name="clean" description="Cleans up all build-generated output">
<delete dir="${work.dir}"/>
<delete dir="${target.dir}"/>
<!-- Delete the Enterprise plugin in the openfire plugin directory, if this isn't an enterprise build -->
<if>
<not><equals arg1="${do.enterprise}" arg2="true"/></not>
<then>
<!-- Copy pre-configured openfireHome dir -->
<delete dir="${basedir}/src/plugins/enterprise" />
</then>
</if>
</target>
<target name="clean-jspc" description="Cleans up all JSPC output">
<delete dir="${jspc.dest.dir}"/>
</target>
<target name="clean-test" description="Cleans up all compiled test classes">
<delete dir="${test.classes.dest.dir}"/>
</target>
<target name="clean-plugins" description="Cleans up all generated plugins">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${plugin.dest.dir}" excludes="admin/**/*.*"/>
</delete>
<delete dir="${plugin.dev.dest.dir}"/>
</target>
<target name="clean-plugin" description="Cleans up one generated plugin">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${plugin.dest.dir}/${plugin}.jar" excludes="admin/**/*.*"/>
</delete>
<delete dir="${plugin.dev.dest.dir}/${plugin}" failonerror="false"/>
</target>
<!-- Mac installer ========================================================================= -->
<property name="target.osx" value="${work.dir}/osx" />
<property name="mac.pkg.dir" value="${target.osx}/macpkg"/>
<property name="mac.dmg.dir" value="${target.osx}/Openfire"/>
<property name="mac.dmg.file" value="${release.dest.dir}/openfire.dmg"/>
<property name="mac.template" value="${target.osx}/template"/>
<property name="mac.prefpane.build" value="${target.osx}/prefPane"/>
<target name="mac.delete">
<delete dir="${mac.pkg.dir}" failonerror="false"/>
<delete dir="${mac.dmg.dir}" failonerror="false"/>
<delete file="${mac.dmg.file}" failonerror="false"/>
<delete dir="${mac.template}" failonerror="false"/>
<delete dir="${mac.prefpane.build}" failonerror="false"/>
</target>
<target name="mac.prefpane">
<!-- install will put it in macpkg/Library/PreferencePanes/ as specified in the target settings -->
<copy todir="${mac.prefpane.build}" >
<fileset dir="${basedir}/build/osx/openfirePrefPane" />
</copy>
<exec executable="/usr/bin/xcodebuild" dir="${mac.prefpane.build}" failonerror="true">
<arg value="-configuration"/>
<arg value="Deployment"/>
<arg value="-target"/>
<arg value="Openfire"/>
<arg value="clean"/>
<arg value="install"/>
</exec>
</target>
<target name="mac.prepare" depends="mac.delete,openfire, mac.prefpane">
<copy todir="${mac.pkg.dir}/usr/local/openfire">
<fileset dir="${target.dir}/openfire">
<exclude name="**/openfired"/>
<exclude name="**/openfirectl"/>
<exclude name="**/redhat"/>
<exclude name="**/embedded-db*"/>
<exclude name="**/redhat-postinstall.sh"/>
</fileset>
</copy>
<mkdir dir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<copy file="${basedir}/build/osx/org.jivesoftware.openfire.plist"
todir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<mkdir dir="${mac.dmg.dir}"/>
<mkdir dir="${mac.pkg.dir}/Library/PreferencePanes"/>
<copy todir="${mac.pkg.dir}/Library/PreferencePanes">
<fileset dir="${mac.prefpane.build}/build/UninstalledProducts/"/>
</copy>
<chmod perm="o+x">
<fileset dir="${mac.pkg.dir}/Library/PreferencePanes/Openfire.prefPane/Contents/MacOS/">
<include name="HelperTool"/>
</fileset>
</chmod>
<chmod perm="ug+x">
<fileset dir="${mac.pkg.dir}/usr/local/openfire/bin">
<include name="extra/openfire-launchd-wrapper.sh"/>
</fileset>
<fileset dir="${basedir}/build/osx/resources"/>
</chmod>
<mkdir dir="${mac.template}/.background"/>
<copy todir="${mac.template}/.background">
<fileset file="${basedir}/build/osx/dmgBackground.png"/>
</copy>
</target>
<!-- Create a Mac OS X installer -->
<target name="mac.pkg" depends="mac.prepare">
<tstamp>
<format property="copyrightyear" pattern="yyyy"/>
</tstamp>
<copy todir="${target.osx}" file="${basedir}/build/osx/Info.plist"/>
<replace file="${target.osx}/Info.plist">
<replacefilter token="%VERSION%" value="${version}"/>
<replacefilter token="%VERSIONMAJOR%" value="${version.major}"/>
<replacefilter token="%VERSIONMINOR%" value="${version.minor}"/>
<replacefilter token="%COPYRIGHT%" value="${copyrightyear}"/>
</replace>
<copy todir="${target.osx}" file="${basedir}/build/osx/Description.plist"/>
<exec executable="/Developer/usr/bin/packagemaker">
<arg value="-build"/>
<arg value="-f"/>
<arg value="${mac.pkg.dir}"/>
<arg value="-i"/>
<arg value="${target.osx}/Info.plist"/>
<arg value="-d"/>
<arg value="${target.osx}/Description.plist"/>
<arg value="-r"/>
<arg value="${basedir}/build/osx/resources"/>
<!--<arg value="-proj"/>
<arg value="${basedir}/build/osx/openfire.pmproj"/> -->
<arg value="-p"/>
<arg value="${mac.template}/Openfire.pkg"/>
<arg value="-ds"/>
<arg value="-v"/>
</exec>
</target>
<target name="installer.mac" depends="mac.pkg" description="Creates a Mac OS X package">
<mkdir dir="${release.dest.dir}"/>
<exec executable="hdiutil" failonerror="true">
<arg line="create -srcfolder '${mac.template}' -volname 'Openfire' -fs HFS+ -fsargs '-c c=64,a=16,e=16' -format UDRW '${target.osx}/tmp.dmg'"/>
</exec>
<exec executable="hdiutil" failonerror="true">
<arg line="attach '${target.osx}/tmp.dmg' -readwrite -noverify -noautoopen -noidme -mountpoint '${mac.dmg.dir}'"/>
</exec>
<!-- OF-386 - commented out since it wasn't working with our Bamboo remote agent // TODO: fix it
<exec executable="osascript" dir="${basedir}/build/osx/" failonerror="true">
<arg value="dmg_openfire.scpt"/>
<arg value="Openfire"/>
<arg value="images"/>
<arg value="360"/>
<arg value="200"/>
<arg value="450"/>
<arg value="220"/>
<arg value="128"/>
</exec>
-->
<exec executable="hdiutil" failonerror="true">
<arg line="detach ${mac.dmg.dir} -quiet -force"/>
</exec>
<exec executable="hdiutil" failonerror="true">
<arg line="convert ${target.osx}/tmp.dmg -format UDZO -imagekey zlib-level=9 -o ${mac.dmg.file}"/>
</exec>
<delete file="${target.osx}/tmp.dmg"/>
</target>
<!-- Debian package ========================================================================= -->
<property name="debian.dir" value="${basedir}/build/debian"/>
<property name="debian.release.dir" value="${release.dest.dir}/debian"/>
<property name="debian.version" value="${version.major}.${version.minor}.${version.revision}"/>
<property name="debian.work.dir" value="${work.dir}/debian/${dist.prefix}-${debian.version}"/>
<tstamp>
<format property="debian.builddate" pattern="EEE, dd MMM yyyy HH:mm:ss Z" locale="en"/>
</tstamp>
<target name="installer.debian" depends="dist.src" description="Creates a Debian package">
<!-- Copy the sources to some place to work -->
<copy todir="${debian.work.dir}">
<fileset dir="${release.src.out.dir}">
<include name="**/*" />
</fileset>
</copy>
<!-- Copy build/debian into workdir -->
<copy todir="${debian.work.dir}/debian">
<fileset dir="${debian.dir}/" includes="**/*"/>
<filterset>
<filter token="builddate" value="${debian.builddate}"/>
<filter token="version" value="${debian.version}"/>
</filterset>
</copy>
<!-- Make the copied 'rules' executable -->
<chmod file="${debian.work.dir}/debian/rules" perm="755" />
<!-- Create the package -->
<exec executable="dpkg-buildpackage" dir="${debian.work.dir}" failonerror="true">
<!-- Allow building without root-privs -->
<arg line="-rfakeroot"/>
<!-- Don't sign source -->
<arg line="-us"/>
<!-- Don't sign changelog -->
<arg line="-uc"/>
</exec>
<!-- Copy the resulting files into target -->
<copy todir="${debian.release.dir}">
<fileset dir="${debian.work.dir}/.." followsymlinks="false">
<include name="**/*.deb" />
<include name="**/*.changes" />
<include name="**/*.dsc" />
<include name="**/*.gz" />
</fileset>
</copy>
</target>
</project>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2000-2007 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can obtain
a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
Sun designates this particular file as subject to the "Classpath" exception
as provided by Sun in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the License
Header, with the fields enclosed by brackets [] replaced by your own
identifying information: "Portions Copyrighted [year]
[name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->
<!--
This is the XML DTD for the Servlet 2.3 deployment descriptor.
All Servlet 2.3 deployment descriptors must include a DOCTYPE
of the following form:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
-->
<!--
The following conventions apply to all J2EE deployment descriptor
elements unless indicated otherwise.
- In elements that contain PCDATA, leading and trailing whitespace
in the data may be ignored.
- In elements whose value is an "enumerated type", the value is
case sensitive.
- In elements that specify a pathname to a file within the same
JAR file, relative filenames (i.e., those not starting with "/")
are considered relative to the root of the JAR file's namespace.
Absolute filenames (i.e., those starting with "/") also specify
names in the root of the JAR file's namespace. In general, relative
names are preferred. The exception is .war files where absolute
names are preferred for consistency with the servlet API.
-->
<!--
The web-app element is the root of the deployment descriptor for
a web application.
-->
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*)>
<!--
The auth-constraint element indicates the user roles that should
be permitted access to this resource collection. The role-name
used here must either correspond to the role-name of one of the
security-role elements defined for this web application, or be
the specially reserved role-name "*" that is a compact syntax for
indicating all roles in the web application. If both "*" and
rolenames appear, the container interprets this as all roles.
If no roles are defined, no user is allowed access to the portion of
the web application described by the containing security-constraint.
The container matches role names case sensitively when determining
access.
Used in: security-constraint
-->
<!ELEMENT auth-constraint (description?, role-name*)>
<!--
The auth-method element is used to configure the authentication
mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization
constraint, a user must have authenticated using the configured
mechanism. Legal values for this element are "BASIC", "DIGEST",
"FORM", or "CLIENT-CERT".
Used in: login-config
-->
<!ELEMENT auth-method (#PCDATA)>
<!--
The context-param element contains the declaration of a web
application's servlet context initialization parameters.
Used in: web-app
-->
<!ELEMENT context-param (param-name, param-value, description?)>
<!--
The description element is used to provide text describing the parent
element. The description element should include any information that
the web application war file producer wants to provide to the consumer of
the web application war file (i.e., to the Deployer). Typically, the tools
used by the web application war file consumer will display the description
when processing the parent element that contains the description.
Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,
env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,
security-role, security-role-ref, servlet, user-data-constraint,
web-app, web-resource-collection
-->
<!ELEMENT description (#PCDATA)>
<!--
The display-name element contains a short name that is intended to be
displayed by tools. The display name need not be unique.
Used in: filter, security-constraint, servlet, web-app
Example:
<display-name>Employee Self Service</display-name>
-->
<!ELEMENT display-name (#PCDATA)>
<!--
The distributable element, by its presence in a web application
deployment descriptor, indicates that this web application is
programmed appropriately to be deployed into a distributed servlet
container
Used in: web-app
-->
<!ELEMENT distributable EMPTY>
<!--
The ejb-link element is used in the ejb-ref or ejb-local-ref
elements to specify that an EJB reference is linked to an
enterprise bean.
The name in the ejb-link element is composed of a
path name specifying the ejb-jar containing the referenced enterprise
bean with the ejb-name of the target bean appended and separated from
the path name by "#". The path name is relative to the war file
containing the web application that is referencing the enterprise bean.
This allows multiple enterprise beans with the same ejb-name to be
uniquely identified.
Used in: ejb-local-ref, ejb-ref
Examples:
<ejb-link>EmployeeRecord</ejb-link>
<ejb-link>../products/product.jar#ProductEJB</ejb-link>
-->
<!ELEMENT ejb-link (#PCDATA)>
<!--
The ejb-local-ref element is used for the declaration of a reference to
an enterprise bean's local home. The declaration consists of:
- an optional description
- the EJB reference name used in the code of the web application
that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected local home and local interfaces of the referenced
enterprise bean
- optional ejb-link information, used to specify the referenced
enterprise bean
Used in: web-app
-->
<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,
local-home, local, ejb-link?)>
<!--
The ejb-ref element is used for the declaration of a reference to
an enterprise bean's home. The declaration consists of:
- an optional description
- the EJB reference name used in the code of
the web application that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected home and remote interfaces of the referenced
enterprise bean
- optional ejb-link information, used to specify the referenced
enterprise bean
Used in: web-app
-->
<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,
home, remote, ejb-link?)>
<!--
The ejb-ref-name element contains the name of an EJB reference. The
EJB reference is an entry in the web application's environment and is
relative to the java:comp/env context. The name must be unique
within the web application.
It is recommended that name is prefixed with "ejb/".
Used in: ejb-local-ref, ejb-ref
Example:
<ejb-ref-name>ejb/Payroll</ejb-ref-name>
-->
<!ELEMENT ejb-ref-name (#PCDATA)>
<!--
The ejb-ref-type element contains the expected type of the
referenced enterprise bean.
The ejb-ref-type element must be one of the following:
<ejb-ref-type>Entity</ejb-ref-type>
<ejb-ref-type>Session</ejb-ref-type>
Used in: ejb-local-ref, ejb-ref
-->
<!ELEMENT ejb-ref-type (#PCDATA)>
<!--
The env-entry element contains the declaration of a web application's
environment entry. The declaration consists of an optional
description, the name of the environment entry, and an optional
value. If a value is not specified, one must be supplied
during deployment.
-->
<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
env-entry-type)>
<!--
The env-entry-name element contains the name of a web applications's
environment entry. The name is a JNDI name relative to the
java:comp/env context. The name must be unique within a web application.
Example:
<env-entry-name>minAmount</env-entry-name>
Used in: env-entry
-->
<!ELEMENT env-entry-name (#PCDATA)>
<!--
The env-entry-type element contains the fully-qualified Java type of
the environment entry value that is expected by the web application's
code.
The following are the legal values of env-entry-type:
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.String
java.lang.Short
java.lang.Integer
java.lang.Long
java.lang.Float
java.lang.Double
Used in: env-entry
-->
<!ELEMENT env-entry-type (#PCDATA)>
<!--
The env-entry-value element contains the value of a web application's
environment entry. The value must be a String that is valid for the
constructor of the specified type that takes a single String
parameter, or for java.lang.Character, a single character.
Example:
<env-entry-value>100.00</env-entry-value>
Used in: env-entry
-->
<!ELEMENT env-entry-value (#PCDATA)>
<!--
The error-code contains an HTTP error code, ex: 404
Used in: error-page
-->
<!ELEMENT error-code (#PCDATA)>
<!--
The error-page element contains a mapping between an error code
or exception type to the path of a resource in the web application
Used in: web-app
-->
<!ELEMENT error-page ((error-code | exception-type), location)>
<!--
The exception type contains a fully qualified class name of a
Java exception type.
Used in: error-page
-->
<!ELEMENT exception-type (#PCDATA)>
<!--
The extension element contains a string describing an
extension. example: "txt"
Used in: mime-mapping
-->
<!ELEMENT extension (#PCDATA)>
<!--
Declares a filter in the web application. The filter is mapped to
either a servlet or a URL pattern in the filter-mapping element, using
the filter-name value to reference. Filters can access the
initialization parameters declared in the deployment descriptor at
runtime via the FilterConfig interface.
Used in: web-app
-->
<!ELEMENT filter (icon?, filter-name, display-name?, description?,
filter-class, init-param*)>
<!--
The fully qualified classname of the filter.
Used in: filter
-->
<!ELEMENT filter-class (#PCDATA)>
<!--
Declaration of the filter mappings in this web application. The
container uses the filter-mapping declarations to decide which filters
to apply to a request, and in what order. The container matches the
request URI to a Servlet in the normal way. To determine which filters
to apply it matches filter-mapping declarations either on servlet-name,
or on url-pattern for each filter-mapping element, depending on which
style is used. The order in which filters are invoked is the order in
which filter-mapping declarations that match a request URI for a
servlet appear in the list of filter-mapping elements.The filter-name
value must be the value of the <filter-name> sub-elements of one of the
<filter> declarations in the deployment descriptor.
Used in: web-app
-->
<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>
<!--
The logical name of the filter. This name is used to map the filter.
Each filter name is unique within the web application.
Used in: filter, filter-mapping
-->
<!ELEMENT filter-name (#PCDATA)>
<!--
The form-error-page element defines the location in the web app
where the error page that is displayed when login is not successful
can be found. The path begins with a leading / and is interpreted
relative to the root of the WAR.
Used in: form-login-config
-->
<!ELEMENT form-error-page (#PCDATA)>
<!--
The form-login-config element specifies the login and error pages
that should be used in form based login. If form based authentication
is not used, these elements are ignored.
Used in: login-config
-->
<!ELEMENT form-login-config (form-login-page, form-error-page)>
<!--
The form-login-page element defines the location in the web app
where the page that can be used for login can be found. The path
begins with a leading / and is interpreted relative to the root of the WAR.
Used in: form-login-config
-->
<!ELEMENT form-login-page (#PCDATA)>
<!--
The home element contains the fully-qualified name of the enterprise
bean's home interface.
Used in: ejb-ref
Example:
<home>com.aardvark.payroll.PayrollHome</home>
-->
<!ELEMENT home (#PCDATA)>
<!--
The http-method contains an HTTP method (GET | POST |...).
Used in: web-resource-collection
-->
<!ELEMENT http-method (#PCDATA)>
<!--
The icon element contains small-icon and large-icon elements that
specify the file names for small and a large GIF or JPEG icon images
used to represent the parent element in a GUI tool.
Used in: filter, servlet, web-app
-->
<!ELEMENT icon (small-icon?, large-icon?)>
<!--
The init-param element contains a name/value pair as an
initialization param of the servlet
Used in: filter, servlet
-->
<!ELEMENT init-param (param-name, param-value, description?)>
<!--
The jsp-file element contains the full path to a JSP file within
the web application beginning with a `/'.
Used in: servlet
-->
<!ELEMENT jsp-file (#PCDATA)>
<!--
The large-icon element contains the name of a file
containing a large (32 x 32) icon image. The file
name is a relative path within the web application's
war file.
The image may be either in the JPEG or GIF format.
The icon can be used by tools.
Used in: icon
Example:
<large-icon>employee-service-icon32x32.jpg</large-icon>
-->
<!ELEMENT large-icon (#PCDATA)>
<!--
The listener element indicates the deployment properties for a web
application listener bean.
Used in: web-app
-->
<!ELEMENT listener (listener-class)>
<!--
The listener-class element declares a class in the application must be
registered as a web application listener bean. The value is the fully qualified classname of the listener class.
Used in: listener
-->
<!ELEMENT listener-class (#PCDATA)>
<!--
The load-on-startup element indicates that this servlet should be
loaded (instantiated and have its init() called) on the startup
of the web application. The optional contents of
these element must be an integer indicating the order in which
the servlet should be loaded. If the value is a negative integer,
or the element is not present, the container is free to load the
servlet whenever it chooses. If the value is a positive integer
or 0, the container must load and initialize the servlet as the
application is deployed. The container must guarantee that
servlets marked with lower integers are loaded before servlets
marked with higher integers. The container may choose the order
of loading of servlets with the same load-on-start-up value.
Used in: servlet
-->
<!ELEMENT load-on-startup (#PCDATA)>
<!--
The local element contains the fully-qualified name of the
enterprise bean's local interface.
Used in: ejb-local-ref
-->
<!ELEMENT local (#PCDATA)>
<!--
The local-home element contains the fully-qualified name of the
enterprise bean's local home interface.
Used in: ejb-local-ref
-->
<!ELEMENT local-home (#PCDATA)>
<!--
The location element contains the location of the resource in the web
application relative to the root of the web application. The value of
the location must have a leading `/'.
Used in: error-page
-->
<!ELEMENT location (#PCDATA)>
<!--
The login-config element is used to configure the authentication
method that should be used, the realm name that should be used for
this application, and the attributes that are needed by the form login
mechanism.
Used in: web-app
-->
<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
<!--
The mime-mapping element defines a mapping between an extension
and a mime type.
Used in: web-app
-->
<!ELEMENT mime-mapping (extension, mime-type)>
<!--
The mime-type element contains a defined mime type. example:
"text/plain"
Used in: mime-mapping
-->
<!ELEMENT mime-type (#PCDATA)>
<!--
The param-name element contains the name of a parameter. Each parameter
name must be unique in the web application.
Used in: context-param, init-param
-->
<!ELEMENT param-name (#PCDATA)>
<!--
The param-value element contains the value of a parameter.
Used in: context-param, init-param
-->
<!ELEMENT param-value (#PCDATA)>
<!--
The realm name element specifies the realm name to use in HTTP
Basic authorization.
Used in: login-config
-->
<!ELEMENT realm-name (#PCDATA)>
<!--
The remote element contains the fully-qualified name of the enterprise
bean's remote interface.
Used in: ejb-ref
Example:
<remote>com.wombat.empl.EmployeeService</remote>
-->
<!ELEMENT remote (#PCDATA)>
<!--
The res-auth element specifies whether the web application code signs
on programmatically to the resource manager, or whether the Container
will sign on to the resource manager on behalf of the web application. In the
latter case, the Container uses information that is supplied by the
Deployer.
The value of this element must be one of the two following:
<res-auth>Application</res-auth>
<res-auth>Container</res-auth>
Used in: resource-ref
-->
<!ELEMENT res-auth (#PCDATA)>
<!--
The res-ref-name element specifies the name of a resource manager
connection factory reference. The name is a JNDI name relative to the
java:comp/env context. The name must be unique within a web application.
Used in: resource-ref
-->
<!ELEMENT res-ref-name (#PCDATA)>
<!--
The res-sharing-scope element specifies whether connections obtained
through the given resource manager connection factory reference can be
shared. The value of this element, if specified, must be one of the
two following:
<res-sharing-scope>Shareable</res-sharing-scope>
<res-sharing-scope>Unshareable</res-sharing-scope>
The default value is Shareable.
Used in: resource-ref
-->
<!ELEMENT res-sharing-scope (#PCDATA)>
<!--
The res-type element specifies the type of the data source. The type
is specified by the fully qualified Java language class or interface
expected to be implemented by the data source.
Used in: resource-ref
-->
<!ELEMENT res-type (#PCDATA)>
<!--
The resource-env-ref element contains a declaration of a web application's
reference to an administered object associated with a resource
in the web application's environment. It consists of an optional
description, the resource environment reference name, and an
indication of the resource environment reference type expected by
the web application code.
Used in: web-app
Example:
<resource-env-ref>
<resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
-->
<!ELEMENT resource-env-ref (description?, resource-env-ref-name,
resource-env-ref-type)>
<!--
The resource-env-ref-name element specifies the name of a resource
environment reference; its value is the environment entry name used in
the web application code. The name is a JNDI name relative to the
java:comp/env context and must be unique within a web application.
Used in: resource-env-ref
-->
<!ELEMENT resource-env-ref-name (#PCDATA)>
<!--
The resource-env-ref-type element specifies the type of a resource
environment reference. It is the fully qualified name of a Java
language class or interface.
Used in: resource-env-ref
-->
<!ELEMENT resource-env-ref-type (#PCDATA)>
<!--
The resource-ref element contains a declaration of a web application's
reference to an external resource. It consists of an optional
description, the resource manager connection factory reference name,
the indication of the resource manager connection factory type
expected by the web application code, the type of authentication
(Application or Container), and an optional specification of the
shareability of connections obtained from the resource (Shareable or
Unshareable).
Used in: web-app
Example:
<resource-ref>
<res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
-->
<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,
res-sharing-scope?)>
<!--
The role-link element is a reference to a defined security role. The
role-link element must contain the name of one of the security roles
defined in the security-role elements.
Used in: security-role-ref
-->
<!ELEMENT role-link (#PCDATA)>
<!--
The role-name element contains the name of a security role.
The name must conform to the lexical rules for an NMTOKEN.
Used in: auth-constraint, run-as, security-role, security-role-ref
-->
<!ELEMENT role-name (#PCDATA)>
<!--
The run-as element specifies the run-as identity to be used for the
execution of the web application. It contains an optional description, and
the name of a security role.
Used in: servlet
-->
<!ELEMENT run-as (description?, role-name)>
<!--
The security-constraint element is used to associate security
constraints with one or more web resource collections
Used in: web-app
-->
<!ELEMENT security-constraint (display-name?, web-resource-collection+,
auth-constraint?, user-data-constraint?)>
<!--
The security-role element contains the definition of a security
role. The definition consists of an optional description of the
security role, and the security role name.
Used in: web-app
Example:
<security-role>
<description>
This role includes all employees who are authorized
to access the employee service application.
</description>
<role-name>employee</role-name>
</security-role>
-->
<!ELEMENT security-role (description?, role-name)>
<!--
The security-role-ref element contains the declaration of a security
role reference in the web application's code. The declaration consists
of an optional description, the security role name used in the code,
and an optional link to a security role. If the security role is not
specified, the Deployer must choose an appropriate security role.
The value of the role-name element must be the String used as the
parameter to the EJBContext.isCallerInRole(String roleName) method
or the HttpServletRequest.isUserInRole(String role) method.
Used in: servlet
-->
<!ELEMENT security-role-ref (description?, role-name, role-link?)>
<!--
The servlet element contains the declarative data of a
servlet. If a jsp-file is specified and the load-on-startup element is
present, then the JSP should be precompiled and loaded.
Used in: web-app
-->
<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
(servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)>
<!--
The servlet-class element contains the fully qualified class name
of the servlet.
Used in: servlet
-->
<!ELEMENT servlet-class (#PCDATA)>
<!--
The servlet-mapping element defines a mapping between a servlet
and a url pattern
Used in: web-app
-->
<!ELEMENT servlet-mapping (servlet-name, url-pattern)>
<!--
The servlet-name element contains the canonical name of the
servlet. Each servlet name is unique within the web application.
Used in: filter-mapping, servlet, servlet-mapping
-->
<!ELEMENT servlet-name (#PCDATA)>
<!--
The session-config element defines the session parameters for
this web application.
Used in: web-app
-->
<!ELEMENT session-config (session-timeout?)>
<!--
The session-timeout element defines the default session timeout
interval for all sessions created in this web application. The
specified timeout must be expressed in a whole number of minutes.
If the timeout is 0 or less, the container ensures the default
behaviour of sessions is never to time out.
Used in: session-config
-->
<!ELEMENT session-timeout (#PCDATA)>
<!--
The small-icon element contains the name of a file
containing a small (16 x 16) icon image. The file
name is a relative path within the web application's
war file.
The image may be either in the JPEG or GIF format.
The icon can be used by tools.
Used in: icon
Example:
<small-icon>employee-service-icon16x16.jpg</small-icon>
-->
<!ELEMENT small-icon (#PCDATA)>
<!--
The taglib element is used to describe a JSP tag library.
Used in: web-app
-->
<!ELEMENT taglib (taglib-uri, taglib-location)>
<!--
the taglib-location element contains the location (as a resource
relative to the root of the web application) where to find the Tag
Libary Description file for the tag library.
Used in: taglib
-->
<!ELEMENT taglib-location (#PCDATA)>
<!--
The taglib-uri element describes a URI, relative to the location
of the web.xml document, identifying a Tag Library used in the Web
Application.
Used in: taglib
-->
<!ELEMENT taglib-uri (#PCDATA)>
<!--
The transport-guarantee element specifies that the communication
between client and server should be NONE, INTEGRAL, or
CONFIDENTIAL. NONE means that the application does not require any
transport guarantees. A value of INTEGRAL means that the application
requires that the data sent between the client and server be sent in
such a way that it can't be changed in transit. CONFIDENTIAL means
that the application requires that the data be transmitted in a
fashion that prevents other entities from observing the contents of
the transmission. In most cases, the presence of the INTEGRAL or
CONFIDENTIAL flag will indicate that the use of SSL is required.
Used in: user-data-constraint
-->
<!ELEMENT transport-guarantee (#PCDATA)>
<!--
The url-pattern element contains the url pattern of the mapping. Must
follow the rules specified in Section 11.2 of the Servlet API
Specification.
Used in: filter-mapping, servlet-mapping, web-resource-collection
-->
<!ELEMENT url-pattern (#PCDATA)>
<!--
The user-data-constraint element is used to indicate how data
communicated between the client and container should be protected.
Used in: security-constraint
-->
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
<!--
The web-resource-collection element is used to identify a subset
of the resources and HTTP methods on those resources within a web
application to which a security constraint applies. If no HTTP methods
are specified, then the security constraint applies to all HTTP
methods.
Used in: security-constraint
-->
<!ELEMENT web-resource-collection (web-resource-name, description?,
url-pattern*, http-method*)>
<!--
The web-resource-name contains the name of this web resource
collection.
Used in: web-resource-collection
-->
<!ELEMENT web-resource-name (#PCDATA)>
<!--
The welcome-file element contains file name to use as a default
welcome file, such as index.html
Used in: welcome-file-list
-->
<!ELEMENT welcome-file (#PCDATA)>
<!--
The welcome-file-list contains an ordered list of welcome files
elements.
Used in: web-app
-->
<!ELEMENT welcome-file-list (welcome-file+)>
<!--
The ID mechanism is to allow tools that produce additional deployment
information (i.e., information beyond the standard deployment
descriptor information) to store the non-standard information in a
separate file, and easily refer from these tool-specific files to the
information in the standard deployment descriptor.
Tools are not allowed to add the non-standard information into the
standard deployment descriptor.
-->
<!ATTLIST auth-constraint id ID #IMPLIED>
<!ATTLIST auth-method id ID #IMPLIED>
<!ATTLIST context-param id ID #IMPLIED>
<!ATTLIST description id ID #IMPLIED>
<!ATTLIST display-name id ID #IMPLIED>
<!ATTLIST distributable id ID #IMPLIED>
<!ATTLIST ejb-link id ID #IMPLIED>
<!ATTLIST ejb-local-ref id ID #IMPLIED>
<!ATTLIST ejb-ref id ID #IMPLIED>
<!ATTLIST ejb-ref-name id ID #IMPLIED>
<!ATTLIST ejb-ref-type id ID #IMPLIED>
<!ATTLIST env-entry id ID #IMPLIED>
<!ATTLIST env-entry-name id ID #IMPLIED>
<!ATTLIST env-entry-type id ID #IMPLIED>
<!ATTLIST env-entry-value id ID #IMPLIED>
<!ATTLIST error-code id ID #IMPLIED>
<!ATTLIST error-page id ID #IMPLIED>
<!ATTLIST exception-type id ID #IMPLIED>
<!ATTLIST extension id ID #IMPLIED>
<!ATTLIST filter id ID #IMPLIED>
<!ATTLIST filter-class id ID #IMPLIED>
<!ATTLIST filter-mapping id ID #IMPLIED>
<!ATTLIST filter-name id ID #IMPLIED>
<!ATTLIST form-error-page id ID #IMPLIED>
<!ATTLIST form-login-config id ID #IMPLIED>
<!ATTLIST form-login-page id ID #IMPLIED>
<!ATTLIST home id ID #IMPLIED>
<!ATTLIST http-method id ID #IMPLIED>
<!ATTLIST icon id ID #IMPLIED>
<!ATTLIST init-param id ID #IMPLIED>
<!ATTLIST jsp-file id ID #IMPLIED>
<!ATTLIST large-icon id ID #IMPLIED>
<!ATTLIST listener id ID #IMPLIED>
<!ATTLIST listener-class id ID #IMPLIED>
<!ATTLIST load-on-startup id ID #IMPLIED>
<!ATTLIST local id ID #IMPLIED>
<!ATTLIST local-home id ID #IMPLIED>
<!ATTLIST location id ID #IMPLIED>
<!ATTLIST login-config id ID #IMPLIED>
<!ATTLIST mime-mapping id ID #IMPLIED>
<!ATTLIST mime-type id ID #IMPLIED>
<!ATTLIST param-name id ID #IMPLIED>
<!ATTLIST param-value id ID #IMPLIED>
<!ATTLIST realm-name id ID #IMPLIED>
<!ATTLIST remote id ID #IMPLIED>
<!ATTLIST res-auth id ID #IMPLIED>
<!ATTLIST res-ref-name id ID #IMPLIED>
<!ATTLIST res-sharing-scope id ID #IMPLIED>
<!ATTLIST res-type id ID #IMPLIED>
<!ATTLIST resource-env-ref id ID #IMPLIED>
<!ATTLIST resource-env-ref-name id ID #IMPLIED>
<!ATTLIST resource-env-ref-type id ID #IMPLIED>
<!ATTLIST resource-ref id ID #IMPLIED>
<!ATTLIST role-link id ID #IMPLIED>
<!ATTLIST role-name id ID #IMPLIED>
<!ATTLIST run-as id ID #IMPLIED>
<!ATTLIST security-constraint id ID #IMPLIED>
<!ATTLIST security-role id ID #IMPLIED>
<!ATTLIST security-role-ref id ID #IMPLIED>
<!ATTLIST servlet id ID #IMPLIED>
<!ATTLIST servlet-class id ID #IMPLIED>
<!ATTLIST servlet-mapping id ID #IMPLIED>
<!ATTLIST servlet-name id ID #IMPLIED>
<!ATTLIST session-config id ID #IMPLIED>
<!ATTLIST session-timeout id ID #IMPLIED>
<!ATTLIST small-icon id ID #IMPLIED>
<!ATTLIST taglib id ID #IMPLIED>
<!ATTLIST taglib-location id ID #IMPLIED>
<!ATTLIST taglib-uri id ID #IMPLIED>
<!ATTLIST transport-guarantee id ID #IMPLIED>
<!ATTLIST url-pattern id ID #IMPLIED>
<!ATTLIST user-data-constraint id ID #IMPLIED>
<!ATTLIST web-app id ID #IMPLIED>
<!ATTLIST web-resource-collection id ID #IMPLIED>
<!ATTLIST web-resource-name id ID #IMPLIED>
<!ATTLIST welcome-file id ID #IMPLIED>
<!ATTLIST welcome-file-list id ID #IMPLIED>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="debug-out" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${openfireHome}/logs/debug.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %c - %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMax" value="debug" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<appender name="info-out" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${openfireHome}/logs/info.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %c - %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMax" value="info" />
<param name="LevelMin" value="info" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<appender name="warn-out" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${openfireHome}/logs/warn.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %c - %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMax" value="warn" />
<param name="LevelMin" value="warn" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<appender name="error-out" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${openfireHome}/logs/error.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %c - %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="error" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<appender name="all-out" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${openfireHome}/logs/all.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %-5p [%t]: %c - %m%n" />
</layout>
</appender>
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%m%n%throwable{0}" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="info" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!-- OF-1095: Uniform output of loading/unloading of plugins to std-out. -->
<logger name="org.jivesoftware.openfire.container.PluginManager">
<appender-ref ref="console"/>
</logger>
<logger name="org.jivesoftware.openfire.container.PluginMonitor">
<appender-ref ref="console"/>
</logger>
<!-- OF-506: Jetty INFO messages are generally not useful. Ignore them by default. -->
<logger name="org.eclipse.jetty">
<level value="warn" />
</logger>
<root>
<level value="info" />
<appender-ref ref="all-out" />
<appender-ref ref="debug-out" />
<appender-ref ref="info-out" />
<appender-ref ref="warn-out" />
<appender-ref ref="error-out" />
</root>
</log4j:configuration>
Name | Version License
---------------------------------------------------------------------------------------------------------------------
ant.jar | Jetty 6.1.0 (1.6.5) | Apache 2.0
ant-contrib.jar | 1.0b3 | Apache 2.0
ant-subdirtask.jar | Revision 1.4 (CVS) |
bcpg-jdk15on.jar | 1.53 | See http://www.bouncycastle.org/licence.html
bcpkix-jdk15on.jar | 1.53 | See http://www.bouncycastle.org/licence.html
bcprov-jdk15on.jar | 1.53 | See http://www.bouncycastle.org/licence.html
cglib.jar | 2.1.3 (JMock 2.1.0) |
commons-lang.jar | 2.3 | Apache 2.0
commons-httpclient.jar | 3.1 | Apache 2.0
commons-codec.jar | 1.9 | Apache 2.0
commons-pool2-2.4.2.jar | 2.4.2 | Apache 2.0
commons-dbcp2-2.1.1.jar | 2.1.1 | Apache 2.0
dom4j.jar | 2.0.0 | See https://github.com/dom4j/dom4j/blob/master/LICENSE
concurrentlinkedhashmap-lru | concurrentlinkedhashmap-lru-1.0_jdk5 | Apache 2.0
dbutil.jar | Jive Code, no release version. | GPL
hsqldb.jar | 2.3.4 | BSD (http://hsqldb.org/web/hsqlLicense.html)
jcl-over-slf4j.jar | 1.7.7 | http://www.slf4j.org/license.html
jetty-annotations.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-continuation.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-http.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-io.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-jmx.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-plus.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-schemas.jar | 3.1 - from Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-security.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-server.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-servlet.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-servlets.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-util.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-webapp.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
jetty-xml.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
spdy-client.jar | Jetty 9.2.14.v20151106 (see #2) | Apache 2.0, Eclipse 1.0
spdy-core.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
spdy-http-common.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
spdy-http-server.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
spdy-server.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
websocket-api.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
websocket-client.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
websocket-common.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
websocket-server.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
websocket-servlet.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
javax-websocket-client-impl.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
javax-websocket-server-impl.jar | Jetty 9.2.14.v20151106 | Apache 2.0, Eclipse 1.0
javax.websocket-api.jar | 1.0 (from Jetty 9.2.14.v20151106) | CDDL+GPL 1.1 (https://glassfish.java.net/public/CDDL+GPL_1_1.html)
org.apache.taglibs.taglibs-standard-impl.jar | 1.2.1 (from Jetty 9.2.14.v20151106) | Apache 2.0
org.apache.taglibs.taglibs-standard-spec.jar | 1.2.1 (from Jetty 9.2.14.v20151106) | Apache 2.0
org.eclipse.jetty.apache-jsp.jar | 9.2.14.v20151106 (from Jetty 9.2.14.v20151106) | Apache 2.0, Eclipse 1.0
org.eclipse.jetty.orbit.org.eclipse.jdt.core.jar | 3.8.2.v20130121 (from Jetty 9.2.14.v20151106) | Eclipse 1.0
org.mortbay.jasper.apache-el.jar | 8.0.9.M3 (from Jetty 9.2.14.v20151106) | Apache 2.0
org.mortbay.jasper.apache-jsp.jar | 8.0.9.M3 (from Jetty 9.2.14.v20151106) | Apache 2.0
jaxen.jar | 1.1.6 (from DOM4J 2.0.0) | Apache 1.1
jdom.jar | 1.0 (required by rome) | Apache 1.1
jmdns.jar | PRE 1.0, patched | Apache 2.0
jsmpp | 2.2.4 | Apache 2.0
jtds.jar | 1.3.1 | LGPL
junit.jar | 4.11 | EPL 1.0
hamcrest-core.jar | 1.3 (required by junit) | new BSD licence
mockito-core.2.10.0.jar | 2.10.0 | MIT (https://github.com/mockito/mockito/wiki/License)
byte-buddy-1.7.4.jar | 1.7.4 (required by mockito-core) | Apache 2.0 (https://github.com/raphw/byte-buddy/blob/master/LICENSE)
byte-buddy-agent-1.7.4.jar | 1.7.4 (required by mockito-core) | Apache 2.0 (https://github.com/raphw/byte-buddy/blob/master/LICENSE)
objenesis-2.6.jar | 1.7.4 (required by mockito-core) | Apache 2.0 (http://objenesis.org/license.html)
jzlib.jar | 1.0.7 | GPL
libidn.jar | 1.15 | GNU Lesser General Public License version 2.1 or later (http://www.gnu.org/licenses/licenses.html)
log4j.jar | 1.2.17 | Apache 2.0 (http://logging.apache.org/log4j/1.2/license.html)
mail.jar | 1.4.1 (JavaMail) |
mina-core.jar | Apache Mina 2.0.7 | Apache 2.0
mina-filter-compression.jar | Apache Mina 2.0.7 | Apache 2.0
mina-integration-beans.jar | Apache Mina 2.0.7 | Apache 2.0
mina-integration-jmx.jar | Apache Mina 2.0.7 | Apache 2.0
mina-integration-ognl.jar | Apache Mina 2.0.7 | Apache 2.0
mssql-jdbc-6.2.2.jre7.jar | 6.2.2.jre7 | MIT
javassist.jar | 3.11.0.GA (Apache Mina 2.0.7) | Apache 2.0
ognl.jar | 3.0.5 (Apache Mina 2.0.7) | Apache 2.0
mysql.jar | 5.1.42 | GPL
pack200task.jar | August 5, 2004 | LGPL
postgres.jar | 42.1.4 JDBC 41 jre7 | BSD (http://jdbc.postgresql.org/license.html)
rome.jar | 0.9 | Apache 2.0
rome-fetcher.jar | 0.9 | Apache 2.0
servlet-api.jar | 3.1 - from Jetty 9.2.14.v20151106 | CDDL Version 1.0 (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
shaj.jar | 0.5 | Apache 2.0
sitemesh.jar | 2.2.1 | Apache 1.1
slf4j-api | 1.7.7 | http://www.slf4j.org/license.html
slf4j-log4j12 | 1.7.7 | http://www.slf4j.org/license.html
slf4j-simple | 1.7.7 | http://www.slf4j.org/license.html
standard.jar | Jakarta standard taglib 1.1.2 |
tinder.jar | 1.3.0 | Apache 2.0
xmltask.jar | 1.16 | Apache 1.1
xpp3.jar | XPP_3 1.1.4c | BSD (http://www.extreme.indiana.edu/viewcvs/~checkout~/XPP3/java/LICENSE.txt)
Notes
-----
1) npn-boot-1.1.7.v20140316.jar added to dist folder
...@@ -28,16 +28,16 @@ compile and make changes to the Openfire source code.</p> ...@@ -28,16 +28,16 @@ compile and make changes to the Openfire source code.</p>
<p>For additional developer resources, please visit: <p>For additional developer resources, please visit:
<a href="http://www.igniterealtime.org"> <a href="http://www.igniterealtime.org">
http://www.igniterealtime.org</a>. The Openfire build process is based on Ant. Visit the http://www.igniterealtime.org</a>. The Openfire build process is based on Apache Maven. Visit the
<a href="http://ant.apache.org/">Ant website</a> <a href="https://maven.apache.org/">Maven website</a>
for more information. There is no need to download and install Ant - a version of it is included for more information.
in this distribution.
<p> <p>
This documentation is divided into three sections: This documentation is divided into three sections:
<ol> <ol>
<li> <a href="#source">Source</a> -- get te Openfire source code. <li> <a href="#source">Source</a> -- get te Openfire source code.
<li> <a href="#setup">Setup</a> -- how to setup your environment for Openfire development. <li> <a href="#setup">Setup</a> -- how to setup your environment for Openfire development.
<li> <a href="#tasks">Build tasks</a> -- tasks that can be performed using the build program. <li> <a href="#phases">Build Phases</a> -- tasks that can be performed using the build program.
</ol> </ol>
...@@ -126,34 +126,19 @@ possible, instructions are provided for both Unix/Linux and Windows users. ...@@ -126,34 +126,19 @@ possible, instructions are provided for both Unix/Linux and Windows users.
</ul> </ul>
</ul> </ul>
<p><b><a name="ant">Install the Ant Build Tool</a></b><p> <p><b><a name="maven">Install the Maven Build Tool</a></b><p>
The Openfire build process uses Ant, so that tool must be installed The Openfire build process uses Maven, so that tool must be installed
and configured on your computer. First download Ant from: and configured on your computer. First download Maven from:
<a href="http://ant.apache.org/">http://ant.apache.org</a>. Next, follow <a href="https://maven.apache.org/">https://maven.apache.org</a>. Next, follow
the <a href="http://ant.apache.org/manual/installlist.html">installation instructions</a>. the <a href="https://maven.apache.org/users/index.html">usage instructions</a>.
<p><b><a name="checkout">Test the Build Script</a></b><p> <p><b><a name="checkout">Test the Build </a></b><p>
<ul> <ul>
Navigate into the subdirectory of this distribution named "build" via the command-line.<p> Navigate into the root direcotry of this distribution named via the command-line.<p>
<table border="0" cellpadding="2" cellspacing="0"><td bgcolor="#EEEEEE">
<font face="verdana, arial, helvetica" size="2">
<font color="red">Linux/Unix users only:</font>You must make the ant script
executable. From the build directory, type:
<p></font><code>
chmod u+x ant
</code>
</td></table>
<p>
Now, invoke the build tool to compile the Openfire source code
<p> <p>
Windows:<span class="code"> ant <br> </span><br clear="left"> Now, invoke the build tool to compile the Openfire source code: <span class="code">mvn compile</span>
Unix/Linux:<span class="code"> ./ant </span>
<p>
If the build tool is invoked correctly and Openfire compiles, you've correctly If the build tool is invoked correctly and Openfire compiles, you've correctly
configured your copy of the Openfire source distribution. configured your copy of the Openfire source distribution.
...@@ -163,98 +148,101 @@ configured your copy of the Openfire source distribution. ...@@ -163,98 +148,101 @@ configured your copy of the Openfire source distribution.
<p><b>Finished!</b><p> <p><b>Finished!</b><p>
<ul> <ul>
If you've gotten this far, you've finished setting up the Openfire source If you've gotten this far, you've finished setting up the Openfire source
distribution. Now, read below to learn about some of the tasks that you can perform distribution.
with the build tool.
</ul> </ul>
<br><br> <br><br>
<p><b><a name="tasks"><font color="#0066cc">3.</font> Build Tasks</a></b><p> <p><b><a name="phases"><font color="#0066cc">3.</font> Build Phases</a></b><p>
The list of common build tasks is below. All build commands should be Openfire conforms to the standard Maven build process. For a full list of the
run from the "build" directory of your Openfire distribution. commands please review the Apache Maven documentation. For more complete help
on several commands, read the documentation below.
<br><br> <br><br>
For a full list of the commands and a brief description from the command line, type To execute a build pahse, type <code>mvn "phase"</code> where "phase" is
<code>ant -projecthelp</code>. For more complete help on several commands, one of the keywords listed below:
read the documentation below.
<br><br>
To execute a build task, type <code>ant [options] targetname</code> where "targetname" is
one of the targets listed below:
<ul> <ul>
<li><a href="#noparams"><i>Default</i></a>
<li><a href="#openfire">openfire</a>
<li><a href="#plugins">plugins</a>
<li><a href="#clean">clean</a> <li><a href="#clean">clean</a>
<li><a href="#compile">compile</a>
<li><a href="#test">test</a>
<li><a href="#package">package</a>
</ul> </ul>
<br><br>
Note that you can combine several phases, for example: <code>mvn clean package</code>.
When a phase is given, Maven will execute every phase in the sequence up to and
including the one defined. For example, when the 'package' phase is executed, the
'compile' and 'test' phases are also executed (but the 'clean' phase is not, unless
specified explicitly). Please refer to the Maven documentation for more details.
<p> <p>
Each task is documented with a syntax guide and description. Optional paramaters
for each task are enclosed with braces. If you would like to permanently set the
value of a property, add it to build/build.xml file.
<!-- default -->
<p><b><a name="noparams"><i>Default</i></a></b> <!--CLEAN-->
<p><b><a name="clean">clean</a></b>
<ul> <ul>
<i>Syntax:</i><p> <i>Syntax:</i><p>
<span class="code"> ant <br></span> <span class="code"> mvn clean <br></span>
<p><i>Description:</i></p> <p><i>Description:</i></p>
Equivalent of calling "ant <a href="#jar">openfire</a>". Cleans all artifacts of the build process.<p>
<p>[<a href="#tasks">return to task list</a>] <p>[<a href="#phases">return to task list</a>]
</ul> </ul>
<!--JAR--> <!--COMPILE-->
<p><b><a name="openfire">openfire</a></b> <p><b><a name="compile">compile</a></b>
<ul> <ul>
<i>Syntax:</i><p> <i>Syntax:</i><p>
<span class="code"> ant openfire <br></span> <span class="code"> mvn compile <br></span>
<p><i>Description:</i></p> <p><i>Description:</i></p>
Builds Openfire into the <tt>target/openfire</tt> directory. You can then launch Builds Openfire components (including plugins) into the <tt>target</tt> directory of each module.
Openfire using the scripts in <tt>target/openfire/bin</tt>.
<p>[<a href="#tasks">return to task list</a>] <p>[<a href="#phases">return to task list</a>]
</ul> </ul>
<!--PLUGINS--> <!--TEST-->
<p><b><a name="jar">plugins</a></b> <p><b><a name="test">test</a></b>
<ul> <ul>
<i>Syntax:</i><p> <i>Syntax:</i><p>
<span class="code"> ant plugins <br></span> <span class="code"> mvn test <br></span>
<p><i>Description:</i></p> <p><i>Description:</i></p>
Builds all plugins into the <tt>target/openfire/plugins</tt> directory. Builds Openfire components, and runs all unit tests.
<p>[<a href="#tasks">return to task list</a>]
<p>[<a href="#phases">return to task list</a>]
</ul> </ul>
<!--CLEAN--> <!--TEST-->
<p><b><a name="clean">clean</a></b> <p><b><a name="package">package</a></b>
<ul> <ul>
<i>Syntax:</i><p> <i>Syntax:</i><p>
<span class="code"> ant clean <br></span> <span class="code"> mvn package <br></span>
<p><i>Description:</i></p> <p><i>Description:</i></p>
Cleans all artifacts of the build process.<p> Builds Openfire components, runs all unit tests, and creates a distributable package
in the <tt>distribution</tt> module. You can then launch
Openfire using the scripts in <tt>distribution/target/distribution-base/bin</tt>.
<p>[<a href="#phases">return to task list</a>]
<p>[<a href="#tasks">return to task list</a>]
</ul> </ul>
......
Name | Version | License
---------------------------------------------------------------------------------------------------------------------
json.jar | 50c3afb2166798c5de0896b90659d8a2b2f8fcec | http://www.json.org/license.html
Notes:
json.jar has been compiled using the code that is made available at https://github.com/douglascrockford/JSON-java
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment