<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ JBoss, a division of Red Hat                                              ~
  ~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
  ~ contributors as indicated by the @authors tag. See the                    ~
  ~ copyright.txt in the distribution for a full listing of                   ~
  ~ individual contributors.                                                  ~
  ~                                                                           ~
  ~ This is free software; you can redistribute it and/or modify it           ~
  ~ under the terms of the GNU Lesser General Public License as               ~
  ~ published by the Free Software Foundation; either version 2.1 of          ~
  ~ the License, or (at your option) any later version.                       ~
  ~                                                                           ~
  ~ This software is distributed in the hope that it will be useful,          ~
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
  ~ Lesser General Public License for more details.                           ~
  ~                                                                           ~
  ~ You should have received a copy of the GNU Lesser General Public          ~
  ~ License along with this software; if not, write to the Free               ~
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->

<!DOCTYPE project [
   <!ENTITY libraries  SYSTEM "../thirdparty/libraries.ent">
   <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent">
   <!ENTITY tools      SYSTEM "../tools/etc/buildfragments/tools.ent">
   <!ENTITY modules    SYSTEM "../tools/etc/buildfragments/modules.ent">
   <!ENTITY defaults   SYSTEM "../tools/etc/buildfragments/defaults.ent">
   <!ENTITY targets    SYSTEM "../tools/etc/buildfragments/targets.ent">
   ]>

<!-- $Id: build.xml 7910 2007-08-14 09:46:27Z julien@jboss.com $ -->

<!--+======================================================================+-->
<!--| JBoss Portal (The OpenSource Portal) Build File                      |-->
<!--|                                                                      |-->
<!--| Distributable under LGPL license.                                    |-->
<!--| See terms of license at http://www.gnu.org.                          |-->
<!--|                                                                      |-->
<!--| This file has been designed to work with the 'tools' module and      |-->
<!--| Buildmagic extentions.                                               |-->
<!--+======================================================================+-->

<project default="main" name="GateIn Portlet Container">

   <!--+====================================================================+-->
   <!--| Setup                                                              |-->
   <!--|                                                                    |-->
   <!--| Include the common build elements.                                 |-->
   <!--|                                                                    |-->
   <!--| This defines several different targets, properties and paths.      |-->
   <!--| It also sets up the basic extention tasks amoung other things.     |-->
   <!--+====================================================================+-->

   &buildmagic;

   &modules;
   &defaults;
   &tools;
   &targets;

   <!-- ================================================================== -->
   <!-- Initialization                                                     -->
   <!-- ================================================================== -->

   <!--
      | Initialize the build system.  Must depend on '_buildmagic:init'.
      | Other targets should depend on 'init' or things will mysteriously fail.
    -->

   <target name="init" unless="init.disable" depends="_buildmagic:init">
   </target>

   <!--+====================================================================+-->
   <!--| Configuration                                                      |-->
   <!--|                                                                    |-->
   <!--| This target is invoked by the Buildmagic initialization logic      |-->
   <!--| and should contain module specific configuration elements.         |-->
   <!--+====================================================================+-->

   <target name="configure" unless="configure.disable">

      <!-- Override the javadoc packages to javax.portlet.* -->
      <property name="javadoc.packages" value="javax.portlet.*,org.jboss.portal.*"/>

      <!-- Configure thirdparty libraries -->
      &libraries;
      <path id="library.classpath">
         <path refid="junit.junit.classpath"/>
      </path>

      <!-- Configure modules -->
      <call target="configure-modules"/>
      <path id="dependentmodule.classpath">
      </path>

      <!--+=======================================+-->
      <!--| Override any default properties here. |-->
      <!--+=======================================+-->

      <!-- Configure defaults & build tools -->
      <call target="configure-defaults"/>
      <call target="configure-tools"/>

      <!--+=======================================+-->
      <!--| Define module specific elements here. |-->
      <!--+=======================================+-->
      <property name="javadoc.private" value="true"/>
      <property name="javadoc.protected" value="false"/>

   </target>

   <!--+====================================================================+-->
   <!--| Compile                                                            |-->
   <!--|                                                                    |-->
   <!--| This target should depend on other compile-* targets for each      |-->
   <!--| different type of compile that needs to be performed, short of     |-->
   <!--| documentation compiles.                                            |-->
   <!--+====================================================================+-->

   <target name="compile"
           description="Compile all source files."
           depends="_default:compile-classes,
               _default:compile-etc,
               _default:compile-resources">
      <!-- Add module specific elements here. -->
   </target>

   <!--+====================================================================+-->
   <!--| Generate Output                                                    |-->
   <!--|                                                                    |-->
   <!--| Generates the target output for this module. Target output is      |-->
   <!--| the output which is ment to be released or used by external        |-->
   <!--| modules.                                                           |-->
   <!--+====================================================================+-->

   <target name="output"
           description="Generate all target output."
           depends="compile">

      <mkdir dir="${build.lib}"/>

      <jar jarfile="${build.lib}/portal-portlet-jsr168api-lib.jar" manifest="${build.etc}/portal-jsr168api-lib-jar.mf">
         <fileset dir="${build.classes}"/>
      </jar>

   </target>

   <!-- ================================================================== -->
   <!-- Cleaning                                                           -->
   <!-- ================================================================== -->

   <!-- Clean up all build output -->
   <target name="clean" depends="_default:clean">
      <!-- Add module specific elements here. -->
   </target>

   <!--+====================================================================+-->
   <!--| Documents                                                          |-->
   <!--|                                                                    |-->
   <!--| Generate all documentation for this module.                        |-->
   <!--+====================================================================+-->

   <target name="docs" depends="_default:docs">
      <!-- Add module specific elements here. -->
   </target>

   <!-- ================================================================== -->
   <!-- Misc.                                                              -->
   <!-- ================================================================== -->

   <target name="main" depends="most"/>
   <target name="all" depends="_default:all"/>
   <target name="most" depends="_default:most"/>
   <target name="help" depends="_default:help"/>

   <target name="package-tests"></target>

</project>
