Author: bdaw
Date: 2007-12-16 12:33:17 -0500 (Sun, 16 Dec 2007)
New Revision: 9352
Added:
modules/web/trunk/build/pom.xml
modules/web/trunk/web/pom.xml
modules/web/trunk/web/src/main/java/
modules/web/trunk/web/src/main/java/org/
modules/web/trunk/web/src/main/java/org/jboss/
modules/web/trunk/web/src/main/java/org/jboss/portal/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/
modules/web/trunk/web/src/test/
modules/web/trunk/web/src/test/java/
modules/web/trunk/web/src/test/java/org/
modules/web/trunk/web/src/test/java/org/jboss/
modules/web/trunk/web/src/test/java/org/jboss/portal/
modules/web/trunk/web/src/test/java/org/jboss/portal/test/
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/
modules/web/trunk/web/src/test/resources/
modules/web/trunk/web/src/test/resources/config/
modules/web/trunk/web/src/test/resources/config/log4j.properties
modules/web/trunk/web/src/test/resources/config/servers.xml
modules/web/trunk/web/src/test/resources/local-jboss-unit.xml
modules/web/trunk/web/src/test/resources/portal-test-request-jar/
modules/web/trunk/web/src/test/resources/portal-test-request-jar/org/
modules/web/trunk/web/src/test/resources/portal-test-spi-jar/
modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/
modules/web/trunk/web/src/test/resources/remote-jboss-unit.xml
modules/web/trunk/web/src/test/resources/spi/
modules/web/trunk/web/src/test/resources/spi/app-war/
modules/web/trunk/web/src/test/resources/spi/generic/
modules/web/trunk/web/src/test/resources/support/
modules/web/trunk/web/src/test/resources/support/jboss-4.2-container-servlet/
modules/web/trunk/web/src/test/resources/support/jboss-4.2-generic/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-container-servlet/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-generic/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-lifecycle-listener/
Removed:
modules/web/trunk/build/build-thirdparty.xml
modules/web/trunk/build/build.bat
modules/web/trunk/build/build.sh
modules/web/trunk/build/build.xml
modules/web/trunk/build/distrib.xml
modules/web/trunk/build/etc/
modules/web/trunk/build/ide/intellij/idea60/
modules/web/trunk/testsuite/
modules/web/trunk/tools/
modules/web/trunk/web/build.xml
modules/web/trunk/web/src/etc/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/command/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/
modules/web/trunk/web/src/main/org/
modules/web/trunk/web/src/resources/
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/
modules/web/trunk/web/src/test/resources/config/log4j.properties
modules/web/trunk/web/src/test/resources/config/servers.xml
modules/web/trunk/web/src/test/resources/portal-test-request-jar/org/
modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/
modules/web/trunk/web/src/test/resources/spi/app-war/
modules/web/trunk/web/src/test/resources/spi/generic/
modules/web/trunk/web/src/test/resources/support/jboss-4.2-container-servlet/
modules/web/trunk/web/src/test/resources/support/jboss-4.2-generic/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-container-servlet/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-generic/
modules/web/trunk/web/src/test/resources/support/tomcat-6.0-lifecycle-listener/
Log:
web module mavanization
Deleted: modules/web/trunk/build/build-thirdparty.xml
===================================================================
--- modules/web/trunk/build/build-thirdparty.xml 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/build/build-thirdparty.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-<project name="main.build"
- default="synchronize"
- basedir=".">
-
- <!-- Property File definitions -->
- <!--<property file="local.properties"/>
- <property file="synchronize.properties"/>-->
- <property environment="env"/>
-
- <!-- Property Definitions -->
- <property name="generatedLibrariesFiles"
value="../thirdparty/libraries.ent"/>
-
-
- <property name="jboss.tasks.path"
- value="../tools/lib/jbossbuild.jar"/>
-
- <!-- Allow jbossbuild.repository to be set from (in order or priority)
- + Command line -Djbossbuild.repository=...
- + synchronize.properties jbossbuild.repository setting
- + JBOSS_REPOSITORY environment variable
- -->
- <condition property="jbossbuild.repository"
value="${env.JBOSS_REPOSITORY}">
- <isset property="env.JBOSS_REPOSITORY"/>
- </condition>
- <!-- Fall back to default -->
- <property name="jbossbuild.repository"
value="http://repository.jboss.com"/>
-
- <!-- File Imports -->
- <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-
- <!-- Main Definition of dependencies -->
- <build id="jbossportal-thirdparty"
- impltitle="JBossPortal"
- implversion="jboss-portal-2.6.1.CR1"
- implvendor="JBoss, a division of Red Hat Inc."
- implurl="http://www.jboss.org"
- description="JBoss Portal"
- cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
- thirdpartypath="../thirdparty/"
- location="${jbossbuild.repository}"
- targetdefs="targets">
-
- <!--
- The repository is in CVS under the module
repository.jboss.com whose contents
- are pushed to the
http://repository.jboss.com site.
- -->
-
- <componentref name="jboss-portal/modules/common"
version="trunk-SNAPSHOT"/>
- <componentref name="jboss-portal/modules/test"
version="trunk-SNAPSHOT"/>
-
- <!-- -->
- <componentref name="sun-servlet" version="2.4"/>
- <componentref name="apache-tomcat" version="5.0.30"/>
- <componentref name="sun-jaf" version="1.0.2"/>
-
- <!-- For JBoss Unit -->
-<!--
- <componentref name="jboss/remoting"
version="2.2.0.SP4"/>
- <componentref name="apache-httpclient" version="3.0.1"/>
- <componentref name="apache-logging"
version="1.0.5.SP1-jboss"/>
- <componentref name="apache-codec" version="1.3.0"/>
--->
- <!-- Cargo -->
- <componentref name="codehaus/cargo"
version="0.9-portal"/>
-
- <!-- MC 2.0.0.Beta4 -->
- <componentref name="jboss/microcontainer"
version="2.0.0.Beta4"/>
- <componentref name="jboss/aop" version="2.0.0.alpha6"/>
- <componentref name="jboss/jbossxb" version="2.0.0.CR4"/>
- <componentref name="jboss/jboss-vfs"
version="2.0.0.Beta4"/>
- <componentref name="jboss/common-core"
version="2.2.1.GA"/>
- <componentref name="jboss/common-logging-log4j"
version="2.0.2.GA"/> <!-- 2.0.3.GA -->
- <componentref name="jboss/common-logging-jdk"
version="2.0.2.GA"/> <!-- 2.0.3.GA -->
- <componentref name="jboss/common-logging-spi"
version="2.0.2.GA"/> <!-- 2.0.3.GA -->
- <componentref name="javassist" version="3.6.0.CR1"/>
<!-- 3.6-beta -->
- <componentref name="apache-xerces" version="2.7.1"/>
- <componentref name="junit" version="3.8.1"/>
- <componentref name="apache-log4j" version="1.2.14"/>
- <componentref name="sun-jaf" version="1.1"/>
- <componentref name="wutka-dtdparser" version="1.2.1"/>
- <componentref name="trove" version="1.0.2"/> <!--
2.1.1 -->
-
- </build>
-
- <synchronizeinfo/>
-
- <target name="generate-lib-file"
- description="generate libraries.ent and thirdparty license info"
- depends="synchronize">
- <gen-lib-file filename="${generatedLibrariesFiles}"/>
- <visit-componentref-graph
-
componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor"/>
- </target>
-
- <!-- Generate the targets -->
- <generate generate="jbossportal-thirdparty"/>
-
-</project>
Deleted: modules/web/trunk/build/build.bat
===================================================================
--- modules/web/trunk/build/build.bat 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/build/build.bat 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,54 +0,0 @@
-@echo off
-rem
-rem Invokes a script of the same name in the 'tools' module.
-rem
-rem The 'tools' module is expected to be a peer directory of the directory
-rem in which this script lives.
-rem
-rem @author Jason Dillon <jason(a)planet57.com>
-rem
-
-rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $
-
-setlocal
-
-set PROGNAME=%~nx0
-set DIRNAME=%~dp0
-
-rem Legacy shell support
-if x%PROGNAME%==x set PROGNAME=build.bat
-if x%DIRNAME%==x set DIRNAME=.\
-
-set MODULE_ROOT=%DIRNAME%
-if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
-set TARGET=%TOOLS_ROOT%\bin\build.bat
-set ARGS=%*
-
-rem Start'er up yo
-goto main
-
-:debug
-if not x%DEBUG%==x echo %PROGNAME%: %*
-goto :EOF
-
-:main
-call :debug PROGNAME=%PROGNAME%
-call :debug DIRNAME=%DIRNAME%
-call :debug TOOLS_ROOT=%TOOLS_ROOT%
-call :debug TARGET=%TARGET%
-
-if exist %TARGET% call :call-script & goto :EOF
-rem else fail, we can not go on
-
-echo %PROGNAME%: *ERROR* The target executable does not exist:
-echo %PROGNAME%:
-echo %PROGNAME%: %TARGET%
-echo %PROGNAME%:
-echo %PROGNAME%: Please make sure you have checked out the 'tools' module
-echo %PROGNAME%: and make sure it is up to date.
-goto :EOF
-
-:call-script
-call :debug Executing %TARGET% %ARGS%
-call %TARGET% %ARGS%
-goto :EOF
Deleted: modules/web/trunk/build/build.sh
===================================================================
--- modules/web/trunk/build/build.sh 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/build/build.sh 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,49 +0,0 @@
-#!/bin/sh
-##
-## Invokes a script of the same name in the 'tools' module.
-##
-## The 'tools' module is expected to be a peer directory of the directory
-## in which this script lives.
-##
-## @author Jason Dillon <jason(a)planet57.com>
-##
-
-# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-
-# Buss it yo
-main() {
- if [ "x$TOOLS_ROOT" = "x" ]; then
- TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
- fi
-
- MODULE_ROOT=`cd $DIRNAME; pwd`
- export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
-
- # Where is the target script?
- target="$TOOLS_ROOT/bin/$PROGNAME"
- if [ ! -f "$target" ]; then
- echo "${PROGNAME}: *ERROR* The target executable does not exist:"
- echo "${PROGNAME}:"
- echo "${PROGNAME}: $target"
- echo "${PROGNAME}:"
- echo "${PROGNAME}: Please make sure you have checked out the 'tools'
module"
- echo "${PROGNAME}: and make sure it is up to date."
- exit 2
- fi
-
- # Get busy yo!
- if [ "x$DEBUG" != "x" ]; then
- echo "${PROGNAME}: Executing: /bin/sh $target $@"
- fi
- if [ "x$TRACE" = "x" ]; then
- exec /bin/sh $target "$@"
- else
- exec /bin/sh -x $target "$@"
- fi
-}
-
-# Lets get ready to rumble!
-main "$@"
Deleted: modules/web/trunk/build/build.xml
===================================================================
--- modules/web/trunk/build/build.xml 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/build/build.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,409 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-
- <!ENTITY buildmagic SYSTEM
"../tools/etc/buildfragments/buildmagic.ent">
- <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
- <!ENTITY defaults SYSTEM
"../tools/etc/buildfragments/defaults.ent">
-
-
- ]>
-
-<!-- $Id: build.xml 7880 2007-08-09 12:38:58Z thomas.heute(a)jboss.com $ -->
-
-<!--+======================================================================+-->
-<!--| JBoss Portal: The OpenSource Portal |-->
-<!--| |-->
-<!--| 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="JBoss Portal">
-
- <!--+====================================================================+-->
- <!--| 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;
-
- <!--+====================================================================+-->
- <!--| Initialization |-->
- <!--| |-->
- <!--| Initialize the build system. Other targets should depend on |-->
- <!--| 'init'.
|-->
- <!--+====================================================================+-->
-
- <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">
-
- <!--+==============================+-->
- <!--| Project version information. |-->
- <!--+==============================+-->
-
- <property name="version.major" value="2"/>
- <property name="version.minor" value="6"/>
- <property name="version.revision" value="0"/>
- <property name="version.tag" value="A"/>
- <property name="version.name" value="Ninja"/>
-
- <!-- This must be set to the CVS tag for any release -->
- <property name="version.cvstag" value="HEAD"/>
-
- <!-- Module name(s) & version -->
- <property name="module.version"
-
value="${version.major}.${version.minor}.${version.revision}${version.tag}"/>
-
- <!-- ========= -->
- <!-- Libraries -->
- <!-- ========= -->
-
- <!-- The combined library classpath -->
-
- <path id="library.classpath">
- </path>
-
- <!-- Configure modules -->
- <call target="configure-modules"/>
- <path id="dependentmodule.classpath">
- <!-- Add dependent module classpath elements here. -->
- </path>
-
- <!--+=======================================+-->
- <!--| Override any default properties here. |-->
- <!--+=======================================+-->
-
- <!-- Configure defaults & build tools -->
-
- <call target="configure-defaults"/>
-
- <!--+=======================================+-->
- <!--| Define module specific elements here. |-->
- <!--+=======================================+-->
-
- <!--+================================+-->
- <!--| Define project structure here. |-->
- <!--+================================+-->
-
- <!-- The group to use by default -->
- <property name="groups" value="default"/>
-
- <!-- Sets up the module configuration. -->
- <moduleconfig property="modules" selected="${groups}">
-
- <!-- Modules -->
-
- <module name="web"/>
-
- <!-- Module groups -->
-
- <group name="web">
- <include
- modules="web"/>
- </group>
-
- <group name="default">
- <include groups="web"/>
- </group>
-
- </moduleconfig>
-
- <!-- Configure project defaults -->
- <call target="configure-project"/>
-
- </target>
- <target name="modules-all"
depends="_buildmagic:modules:all"/>
- <target name="modules-most"
depends="_buildmagic:modules:most"/>
- <target name="modules-main"
depends="_buildmagic:modules:main"/>
- <target name="modules-release"
depends="_buildmagic:modules:release"/>
- <target name="modules-tests"
depends="_buildmagic:modules:tests"/>
- <target name="modules-clean"
depends="_buildmagic:modules:clean"/>
- <target name="modules-clobber"
depends="_buildmagic:modules:clobber"/>
- <target name="modules-package-tests"
depends="_buildmagic:modules:package-tests"/>
-
- <!--+====================================================================+-->
- <!--| Module Pass-through Hooks |-->
- <!--| |-->
- <!--| These hooks are executed after the above pass-through targets have |-->
- <!--| finished with a given module. |-->
- <!--+====================================================================+-->
-
- <!-- Add module pass-through hooks here. -->
-
-
- <!--+====================================================================+-->
- <!--| 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"/>
-
- <!--+====================================================================+-->
- <!--| 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="init">
- <!-- Add module specific elements here. -->
- </target>
-
- <!--+====================================================================+-->
- <!--| Documents |-->
- <!--| |-->
- <!--| Generate all documentation for this module. |-->
- <!--+====================================================================+-->
-
- <target name="docs">
- <ant antfile="build-targets.xml"
target="_default:docs"/>
- <!-- Add module specific elements here. -->
- </target>
-
- <!--+====================================================================+-->
- <!--| Install & Release
|-->
- <!--+====================================================================+-->
-
- <target name="release"
- description="Builds the default release structure."
- depends="modules-most, output"/>
-
- <target name="release-full"
- description="Builds the full release structure."
- depends="modules-all, release"/>
-
- <!--+====================================================================+-->
- <!--| Misc. |-->
- <!--| |-->
- <!--| Standard targets and pseudo-targets. |-->
- <!--+====================================================================+-->
-
- <target name="clean" depends="createthirdparty, modules-clean,
_buildmagic:clean"
- description="Cleans up most generated files.">
- <!-- Add module specific elements here. -->
- </target>
-
- <target name="clobber" depends="_buildmagic:clobber, clean,
modules-clobber"
- description="Cleans up all generated files.">
- <!-- Add module specific elements here. -->
- </target>
-
- <target name="main" depends="most"
- description="Executes the default target (most)."/>
-
- <target name="all" depends="createthirdparty, modules-all"
- description="Executes all modules and builds everything."/>
-
- <target name="most" depends="createthirdparty, modules-most"
- description="Executes all modules and builds most everything."/>
-
- <target name="help" depends="_buildmagic:help:build"
- description="Show this help message."/>
-
- <!--
- | Deploy the application
- -->
-
- <!--<target name="initsetup">-->
- <!--<available property="cmsdata"
file="${jboss.home}/server/${portal.deploy.dir}/data/portal"/>
-->
- <!--</target>-->
-
- <!--<target name="setup" depends="initsetup"
unless="cmsdata">-->
- <!--<unzip src="../core/src/bin/setup/cms-content.zip"
dest="${jboss.home}/server/${portal.deploy.dir}/data"/>-->
- <!--</target>-->
-
- <target name="deploy"
- description="Deploy."
- depends="main">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <copy file="../core/output/lib/jboss-portal.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
- overwrite="true"/>
- </target>
-
- <target name="undeploy"
- description="Undeploy."
- depends="init">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
- </target>
-
- <target name="deploy-all"
- description="Deploy all archives."
- depends="most">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <copy file="../core/output/lib/jboss-portal.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-admin/output/lib//portal-admin.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-cms/output/lib/portal-cms.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-management/output/lib/portal-management.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-samples/output/lib/portal-basic-samples.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-samples/output/lib/portal-news-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-samples/output/lib/portal-jsp-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../core-samples/output/lib/portal-weather-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <!--<copy file="../core-search/output/lib/portal-search.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>-->
- <copy file="../widget/output/lib/widget.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="../wsrp/output/lib/portal-wsrp.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- </target>
-
- <target name="undeploy-all"
- description="Undeploy all archives."
- depends="init">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-cms.sar"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-management.sar"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-basic-samples.sar"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
- <!--<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
- </target>
-
- <target name="exploded-deploy"
- description="Deploy exploded sar."
- depends="main">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <delete
dir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal-exploded.sar"/>
- <mkdir
dir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal-exploded.sar"/>
- <copy
todir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal-exploded.sar">
- <fileset dir="../core/output/resources/jboss-portal.sar"/>
- </copy>
- </target>
-
- <target name="javadoc">
- <mkdir dir="javadoc"/>
- <javadoc destdir="javadoc">
- <classpath>
- <fileset dir="../thirdparty" includes="**/*.jar"/>
- </classpath>
- <packageset dir="../common/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../web/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../server/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../api/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../portlet/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../portlet-server/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../jems/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../identity/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../bridge/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../faces/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../portlet-federation/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../format/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../theme/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../cms/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core-admin/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core-cms/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core-management/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../security/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../wsrp/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../wsrp/src/generated">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../registration/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../widget/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../workflow/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../search/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core-samples/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- <packageset dir="../core-search/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
- </javadoc>
- </target>
-
- <!-- create the thirdparty folder from items in the repository -->
- <!-- then generate a new libraries.ent file and include it in -->
- <!-- the build -->
- <target name="createthirdparty" unless="inhibit.downloads"
- depends="check.inhibit.downloads">
- <ant antfile="build-thirdparty.xml"
target="generate-lib-file"/>
- </target>
-
- <!-- check if thirdparty libraries are to be downloaded -->
- <target name="check.inhibit.downloads">
- <condition property="inhibit.downloads">
- <or>
- <uptodate property="dependencies.current"
- srcfile="build-thirdparty.xml"
- targetfile="../thirdparty/libraries.ent"/>
- <istrue value="${nodownload}"/>
- </or>
- </condition>
- </target>
-
-</project>
Deleted: modules/web/trunk/build/distrib.xml
===================================================================
--- modules/web/trunk/build/distrib.xml 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/build/distrib.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,398 +0,0 @@
-<project default="main" name="JBoss Portal">
-
- <property name="source.dir"
value="../../jboss-portal-2.6"/>
- <property name="docs.dir" value="${source.dir}-docs"/>
- <property name="release.version" value="2.6.1.GA"/>
-
- <!-- -->
- <property name="portal.release.normal.name"
value="jboss-portal-${release.version}"/>
- <property name="portal.release.ha.name"
value="jboss-portal-ha-${release.version}"/>
-
- <!-- -->
- <property name="portal.build.src"
value="output/${portal.release.normal.name}-src"/>
- <property name="portal.build.normal.bin"
value="output/${portal.release.normal.name}"/>
- <property name="portal.build.ha.bin"
value="output/${portal.release.ha.name}"/>
- <property name="portal.build.normal.bundled"
value="output/${portal.release.normal.name}-bundled"/>
- <property name="portal.build.ha.bundled"
value="output/${portal.release.ha.name}-bundled"/>
-
- <property environment="env"/>
-
- <target name="init" unless="jboss.home">
- <property name="jboss.home" value="${env.JBOSS_HOME}"/>
- <echo message="Using JBoss install from $JBOSS_HOME:
${jboss.home}"/>
- </target>
-
- <!--
- <property name="forums.release.name"
value="jboss-forums-${release.version}"/>
- <property name="forums.build.bin"
value="output/${forums.release.name}"/>
- <property name="forums.build.src"
value="output/${forums.release.name}-src"/>
- -->
- <!-- Licenses -->
- <target name="licenses">
- <fileset id="thirdparty-licenses"
dir="../thirdparty/licenses">
- <include name="antlr.txt"/>
- <include name="apache-2.0.txt"/>
- <include name="bsd.txt"/>
- <include name="cddl.txt"/>
- <include name="cpl-1.0/txt"/>
- <include name="day-jcr.txt"/>
- <include name="dom4j.txt"/>
- <include name="ehcache.txt"/>
- <include name="gpl.txt"/>
- <include name="hsqldb.txt"/>
- <include name="httpunit.txt"/>
- <include name="ironsmith.txt"/>
- <include name="lgpl.txt"/>
- <include name="nekohtml.txt"/>
- <include name="oswego.txt"/>
- <include name="public-domain.txt"/>
- <include name="slf4j.txt"/>
- <include name="sun-jaf.txt"/>
- <include name="sun-javamail.txt"/>
- <include name="xdoclet.txt"/>
- </fileset>
- <mkdir dir="output/docs/licenses"/>
- <concat destfile="output/docs/licenses/thirdparty-licenses.txt">
- <fileset refid="thirdparty-licenses"/>
- </concat>
- <copy todir="output/docs/licenses">
- <fileset refid="thirdparty-licenses"/>
- <fileset dir="licences" includes="JBossEULA.txt"/>
- </copy>
- </target>
-
- <!-- Normal build -->
- <target name="_normal.build" depends="init"
unless="normal.build.done">
- <ant dir="${source.dir}/build" antfile="build.xml"/>
-
- <!-- to prevent building several times -->
- <property name="normal.build.done" value="true"/>
- </target>
-
- <!-- Build JBoss Portal artifacts -->
- <target name="source.build" depends="_normal.build">
- <!-- HA specific targets -->
- <ant dir="${source.dir}/core" antfile="build.xml"
target="output-ha"/>
- <ant dir="${source.dir}/core-cms" antfile="build.xml"
target="output-ha"/>
-
- <!-- Datasource files -->
- <ant dir="${source.dir}/core" antfile="build.xml"
target="datasource">
- <!-- Hack because invoking the datasource generation from another build file
replace ${/} -->
- <property name="/" value="${/}"/>
- </ant>
-
- <ant dir="${source.dir}/wsrp" antfile="build.xml"
target="output"/>
- <ant dir="${source.dir}/wsrp" antfile="build.xml"
target="explode"/>
- </target>
-
- <!-- Build JBoss Portal documentation -->
- <target name="doc.build" depends="_normal.build"
unless="no-doc">
- <ant dir="${docs.dir}/referenceGuide"
antfile="build.xml"/>
- <ant dir="${docs.dir}/userGuide" antfile="build.xml"/>
- <ant dir="${docs.dir}/quickstartuser"
antfile="build.xml"/>
- </target>
-
- <!-- Build JBoss Portal -->
- <target name="build" depends="source.build,doc.build"/>
-
-
- <!--<macrodef name="package-doc">
- <attribute name="todir"/>
- <sequential>
- <mkdir dir="${todir}"/>
- <mkdir dir="${todir}/referenceGuide"/>
- <copy todir="${todir}/referenceGuide">
- <fileset dir="${docs.dir}/referenceGuide/build/en/"/>
- </copy>
- <mkdir dir="${todir}/userGuide"/>
- <copy todir="${todir}/userGuide">
- <fileset dir="${docs.dir}/userGuide/build/en/"/>
- </copy>
- <mkdir dir="${todir}/quickstartuser"/>
- <copy todir="${todir}/quickstartuser">
- <fileset dir="${docs.dir}/quickstartuser/build/en/"/>
- </copy>
- </sequential>
- </macrodef>-->
-
- <target name="package-doc">
- <sequential>
- <mkdir dir="${todir}"/>
- <mkdir dir="${todir}/referenceGuide"/>
- <copy todir="${todir}/referenceGuide">
- <fileset dir="${docs.dir}/referenceGuide/build/en/"/>
- </copy>
- <mkdir dir="${todir}/userGuide"/>
- <copy todir="${todir}/userGuide">
- <fileset dir="${docs.dir}/userGuide/build/en/"/>
- </copy>
- <mkdir dir="${todir}/quickstartuser"/>
- <copy todir="${todir}/quickstartuser">
- <fileset dir="${docs.dir}/quickstartuser/build/en/"/>
- </copy>
- </sequential>
- </target>
-
- <target name="package-ds">
- <sequential>
- <mkdir dir="${todir}"/>
- <copy todir="${todir}">
- <fileset dir="${source.dir}/core/output/resources/setup"
includes="portal-*-ds.xml"/>
- </copy>
- </sequential>
- </target>
-
- <target name="package-samples">
- <sequential>
- <mkdir dir="${todir}"/>
- <copy todir="${todir}">
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-basic-samples.sar/**"/>
- </copy>
- <copy file="${docs.dir}/readmeFiles/samples-readme.txt"
tofile="${todir}/readme.txt"/>
- </sequential>
- </target>
-
- <target name="patch-log4j">
- <patch
patchfile="${source.dir}/build/etc/resources/jboss-log4j.xml.diff"
- originalfile="${todir}/conf/jboss-log4j.xml"
strip="1"/>
- </target>
-
- <!-- use -Dno-doc=true if you simply want jboss-portal.sar without licenses
etc-->
- <target name="package-bin" unless="no-doc">
- <sequential>
- <mkdir dir="${todir}"/>
- <antcall target="package-doc">
- <param name="todir" value="${todir}/docs"/>
- </antcall>
- <antcall target="package-ds">
- <param name="todir" value="${todir}/setup"/>
- </antcall>
- <antcall target="package-samples">
- <param name="todir" value="${todir}/samples"/>
- </antcall>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-bin.README"
todir="${todir}"/>
- <copy todir="${todir}/docs/portal/licenses">
- <fileset dir="output/docs/licenses"/>
- </copy>
- </sequential>
- </target>
-
- <target name="package-bundled" unless="no-doc">
- <sequential>
- <mkdir dir="${todir}"/>
- <antcall target="package-doc">
- <param name="todir" value="${todir}/docs/portal"/>
- </antcall>
- <antcall target="package-ds">
- <param name="todir" value="${todir}/setup"/>
- </antcall>
- <antcall target="package-samples">
- <param name="todir" value="${todir}/samples"/>
- </antcall>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-bin.README"
todir="${todir}"/>
- <copy todir="${todir}/docs/portal/licenses">
- <fileset dir="output/docs/licenses"/>
- </copy>
- </sequential>
- </target>
-
- <!-- -->
- <target name="package">
-
- <!-- Create the output directory -->
- <mkdir dir="output"/>
-
- <!--
- | JBoss Portal source distribution
- -->
-
- <mkdir dir="${portal.build.src}"/>
- <antcall target="package-doc">
- <param name="todir"
value="${portal.build.src}/docs"/>
- </antcall>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-src.README"
todir="${portal.build.src}"/>
- <copy todir="${portal.build.src}">
- <fileset dir="${source.dir}" includes="**/*"
-
excludes="*/output/**,**/CVS/*,**/build.log,build/local.properties,forums/**,thirdparty/**"/>
- </copy>
- <copy todir="${portal.build.src}/docs/portal/licenses">
- <fileset dir="output/docs/licenses"/>
- </copy>
- <fixcrlf srcdir="${portal.build.src}" includes="**/*.sh"
eol="lf" eof="remove"/>
- <fixcrlf srcdir="${portal.build.src}" includes="**/*.bat"
eol="crlf"/>
-
- <!--
- | JBoss Portal binaries distribution
- -->
-
- <antcall target="package-normal"/>
- <antcall target="package-ha"/>
- <antcall target="package-normal-bundled"/>
- <antcall target="package-ha-bundled"/>
- </target>
-
- <!--
- | JBoss Portal binary distribution
- -->
-
- <target name="package-normal" description="package
jboss-portal.sar">
- <mkdir dir="${portal.build.normal.bin}"/>
- <antcall target="package-bin">
- <param name="todir"
value="${portal.build.normal.bin}"/>
- </antcall>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
- <fileset
dir="${source.dir}/core/output/resources/jboss-portal.sar"/>
- </copy>
- <copy
todir="${portal.build.normal.bin}/jboss-portal.sar/portal-cms.sar">
- <fileset
dir="${source.dir}/core-cms/output/resources/portal-cms.sar"
includes="**"/>
- </copy>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
- <fileset dir="${source.dir}/widget/output/resources"
includes="widget.war/**"/>
- <fileset dir="${source.dir}/core-management/output/resources"
includes="portal-management.sar/**"/>
- <fileset dir="${source.dir}/core-admin/output/resources"
includes="portal-admin.sar/**"/>
- </copy>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar/samples">
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-jsp-samples.war/**"/>
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-news-samples.war/**"/>
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-weather-samples.war/**"/>
- </copy>
- <mkdir
dir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar"/>
- <copy
todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar">
- <fileset
dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
- </copy>
- </target>
-
- <!--
- | JBoss Portal ha binaries distribution
- -->
- <target name="package-ha" description="package
jboss-portal-ha.sar">
- <mkdir dir="${portal.build.ha.bin}"/>
- <antcall target="package-bin">
- <param name="todir" value="${portal.build.ha.bin}"/>
- </antcall>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
- <fileset
dir="${source.dir}/core/output/resources/jboss-portal-ha.sar"/>
- </copy>
- <copy
todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-cms.sar">
- <fileset
dir="${source.dir}/core-cms/output/resources/portal-cms-ha.sar"
includes="**"/>
- </copy>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
- <fileset dir="${source.dir}/widget/output/resources"
includes="widget.war/**"/>
- <fileset dir="${source.dir}/core-management/output/resources"
includes="portal-management.sar/**"/>
- <fileset dir="${source.dir}/core-admin/output/resources"
includes="portal-admin.sar/**"/>
- </copy>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/samples">
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-jsp-samples.war/**"/>
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-news-samples.war/**"/>
- <fileset dir="${source.dir}/core-samples/output/resources"
includes="portal-weather-samples.war/**"/>
- </copy>
- <mkdir
dir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar"/>
- <copy
todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar">
- <fileset
dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
- </copy>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-ha-bin.README"
todir="${portal.build.ha.bin}"/>
- </target>
-
-
- <!--
- | JBoss Portal bundled distribution
- -->
- <target name="package-normal-bundled" depends="package-normal"
if="jboss.home"
- description="package jboss-portal bundled with JBoss AS">
- <mkdir dir="${portal.build.normal.bundled}"/>
- <antcall target="package-bundled">
- <param name="todir"
value="${portal.build.normal.bundled}"/>
- </antcall>
- <copy
todir="${portal.build.normal.bundled}/server/default/deploy/jboss-portal.sar">
- <fileset dir="${portal.build.normal.bin}/jboss-portal.sar"/>
- </copy>
- <copy
todir="${portal.build.normal.bundled}/server/default/deploy">
- <fileset dir="${portal.build.normal.bin}/setup"
includes="portal-hsqldb-ds.xml"/>
- </copy>
- <copy todir="${portal.build.normal.bundled}">
- <fileset dir="${jboss.home}">
- <include name="bin/**"/>
- <include name="client/**"/>
- <include name="docs/**"/>
- <include name="lib/**"/>
- <include name="server/default/**"/>
- </fileset>
- </copy>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-bin.README"
todir="${portal.build.normal.bundled}"/>
- <antcall target="patch-log4j">
- <param name="todir"
value="${portal.build.normal.bundled}/server/default"/>
- </antcall>
- </target>
-
- <!--
- | JBoss Portal ha bundled distribution
- -->
-
- <target name="package-ha-bundled" depends="package-ha"
if="jboss.home"
- description="package jboss-portal-ha bundled with JBoss AS">
- <mkdir dir="${portal.build.ha.bundled}"/>
- <antcall target="package-bundled">
- <param name="todir"
value="${portal.build.ha.bundled}"/>
- </antcall>
- <copy
todir="${portal.build.ha.bundled}/server/all/deploy/jboss-portal-ha.sar">
- <fileset dir="${portal.build.ha.bin}/jboss-portal-ha.sar"/>
- </copy>
- <copy todir="${portal.build.ha.bundled}">
- <fileset dir="${jboss.home}">
- <include name="bin/**"/>
- <include name="client/**"/>
- <include name="docs/**"/>
- <include name="lib/**"/>
- <include name="server/all/**"/>
- </fileset>
- </copy>
- <copy file="${docs.dir}/readmeFiles/jboss-portal-ha-bin.README"
todir="${portal.build.ha.bundled}"/>
- <antcall target="patch-log4j">
- <param name="todir"
value="${portal.build.normal.bundled}/server/default"/>
- </antcall>
-
- </target>
-
- <!-- Create packages -->
- <target name="zip">
-
- <tar destfile="${portal.build.src}.tar.gz"
- compression="gzip">
- <tarfileset prefix="${portal.release.normal.name}-src"
filemode="775" dir="${portal.build.src}"/>
- </tar>
- <checksum file="${portal.build.src}.tar.gz"/>
-
- <zip destfile="${portal.build.normal.bin}.zip">
- <zipfileset prefix="${portal.release.normal.name}"
dir="${portal.build.normal.bin}"/>
- </zip>
- <checksum file="${portal.build.normal.bin}.zip"/>
-
- <zip destfile="${portal.build.ha.bin}.zip">
- <zipfileset prefix="${portal.release.ha.name}"
dir="${portal.build.ha.bin}"/>
- </zip>
- <checksum file="${portal.build.ha.bin}.zip"/>
-
- <zip destfile="${portal.build.normal.bundled}.zip">
- <zipfileset prefix="${portal.release.normal.name}"
dir="${portal.build.normal.bundled}"/>
- </zip>
- <checksum file="${portal.build.normal.bin}.zip"/>
-
- <zip destfile="${portal.build.ha.bundled}.zip">
- <zipfileset prefix="${portal.release.ha.name}"
dir="${portal.build.ha.bundled}"/>
- </zip>
- <checksum file="${portal.build.ha.bundled}.zip"/>
-
- <!--
- <tar destfile="${forums.build.src}.tar.gz"
- compression="gzip">
- <tarfileset dir="output/${forums.release.name}-src"
- prefix="${forums.release.name}-src"/>
- </tar>
- <zip destfile="${forums.build.bin}.zip"
- basedir="output/${forums.release.name}"/>
- -->
- </target>
-
- <!-- Build and compress everything -->
- <target name="main" depends="licenses,build,package,zip"
description="do everything - build source, doc, distro"/>
-</project>
Added: modules/web/trunk/build/pom.xml
===================================================================
--- modules/web/trunk/build/pom.xml (rev 0)
+++ modules/web/trunk/build/pom.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -0,0 +1,497 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This pom functions as a default configuration. The subproject
+ poms each inherit configuration from this one.
+
+ When adding version information for an artifact please do the following
+ - add a version property for the specific version
+ - add a dependency in the dependencyManagement section which refers to
+ the property
+-->
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>jboss-portal-modules-web</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Test Module</name>
+ <
url>http://www.jboss.com/products/jbossmc</url>
+ <description>JBoss Portal Web Module</description>
+ <scm>
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</con...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk&l...
+ <
url>https://svn.jboss.org/repos/portal/trunk</url>
+ </scm>
+
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <
url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <
url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+
+
+ <properties>
+ <version.activation>1.0.2</version.activation>
+ <version.concurrent>1.3.4</version.concurrent>
+ <version.sun.servlet>2.4</version.sun.servlet>
+ <version.apache.tomcat>5.5.12</version.apache.tomcat>
+ <version.jboss-common-core>2.2.1.GA</version.jboss-common-core>
+ <version.jboss-logging>2.0.3.GA</version.jboss-logging>
+ <version.jboss-vfs>2.0.4.snapshot</version.jboss-vfs>
+ <version.jboss.aop>2.0.0.alpha6</version.jboss.aop>
+ <version.jbossxb>2.0.0.CR3</version.jbossxb>
+ <version.javassist>3.6-beta</version.javassist>
+ <version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
+
<version.jboss.portal.common>1.1.0-SNAPSHOT</version.jboss.portal.common>
+ <version.jboss.unit>1.1.0-SNAPSHOT</version.jboss.unit>
+ <version.log4j>1.2.14</version.log4j>
+ <version.apache.commons-logging>1.1.1</version.apache.commons-logging>
+
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
+ <version.trove>2.1.1</version.trove>
+
<version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.cargo>0.9-portal</version.cargo>
+ <version.junit>3.8.1</version.junit>
+ <version.xerces>2.7.1</version.xerces>
+ <version.ant>1.7.0</version.ant>
+ </properties>
+
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <
url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <
url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <
url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <
url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <
url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <
url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>Codehaus Snapshots</id>
+ <
url>http://snapshots.repository.codehaus.org/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <
id>java.net maven repository</id>
+ <
url>http://download.java.net/maven/2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-changes-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <linkXref>true</linkXref>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+ <dependencyManagement>
+ <!-- The parent pom manages the inter-dependencies of the modules. -->
+ <dependencies>
+
+ <dependency>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ <version>${version.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common</artifactId>
+ <version>${version.jboss.portal.common}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${version.javassist}</version>
+ </dependency>
+ <dependency>
+ <groupId>sun-servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${version.sun.servlet}</version>
+ </dependency>
+ <dependency>
+ <groupId>apache-tomcat</groupId>
+ <artifactId>catalina</artifactId>
+ <version>${version.apache.tomcat}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>${version.concurrent}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common-mc</artifactId>
+ <version>${version.jboss.portal.common}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-remote</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-mc</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-ant</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test-generic</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+ <dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ <version>${version.trove}</version>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>resolver</artifactId>
+ <version>${version.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jbossxb}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-jdk</artifactId>
+ <version>${version.jboss-logging}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <version>${version.jboss-logging}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ <version>${version.jboss-remoting}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ <version>${version.jboss-vfs}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-impl</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-managed</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-metatype</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-as4-deployer</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-deployer-jdk50</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-jdk50</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-jdk50-client</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-standalone-aspect-library-jdk50</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jrockit-pluggable-instrumentor</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>pluggable-instrumentor</artifactId>
+ <version>${version.jboss.aop}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${version.apache.commons-logging}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${version.apache.commons-httpclient}</version>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-manager</artifactId>
+ <type>war</type>
+ <version>${version.cargo}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Deleted: modules/web/trunk/web/build.xml
===================================================================
--- modules/web/trunk/web/build.xml 2007-12-16 17:30:58 UTC (rev 9351)
+++ modules/web/trunk/web/build.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -1,807 +0,0 @@
-<?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 5448 2006-10-13 19:29:17Z chris.laprun(a)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="JBoss Portal">
-
- <!--+====================================================================+-->
- <!--| 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">
-
- <!-- Configure some properties -->
- <property name="jboss-junit-configuration" value=""/>
- <property name="junit.formatter.usefile" value="true"/>
-
- <!-- Configure thirdparty libraries -->
- &libraries;
- <path id="library.classpath">
- <path refid="jboss.portal/modules/common.classpath"/>
- <path refid="jboss.portal/modules/test.classpath"/>
- <path refid="sun.servlet.classpath"/>
- <path refid="oswego.concurrent.classpath"/>
- <path refid="apache.log4j.classpath"/>
- <path refid="junit.junit.classpath"/>
- <path refid="apache.tomcat.classpath"/>
- <path refid="jboss/common.core.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}"/>
-
- <!-- portal-web.jar -->
- <jar jarfile="${build.lib}/portal-web-lib.jar"
manifest="${build.etc}/portal-web-lib-jar.mf">
- <fileset dir="${build.classes}">
- <exclude name="org/jboss/portal/test/**"/>
- </fileset>
- </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"/>
-
- <!-- ================================================================== -->
- <!-- Deployment -->
- <!-- ================================================================== -->
-
- <target name="package-tests" depends="init">
-
- <filelist id="mc.concurrent"
dir="${oswego.concurrent.lib}">
- <file name="concurrent.jar"/>
- </filelist>
- <filelist id="mc.trove" dir="${trove.trove.lib}">
- <file name="trove.jar"/>
- </filelist>
- <filelist id="mc.xerces" dir="${apache.xerces.lib}">
- <file name="xercesImpl.jar"/>
- <file name="resolver.jar"/>
- <file name="xml-apis.jar"/>
- </filelist>
- <filelist id="mc.javassist"
dir="${javassist.javassist.lib}">
- <file name="javassist.jar"/>
- </filelist>
- <filelist id="mc.jboss_common_logging_spi"
dir="${jboss/common.logging.spi.lib}">
- <file name="jboss-logging-spi.jar"/>
- </filelist>
- <filelist id="mc.jboss_common_logging_jdk"
dir="${jboss/common.logging.jdk.lib}">
- <file name="jboss-logging-jdk.jar"/>
- </filelist>
- <filelist id="mc.jboss_common_logging_log4j"
dir="${jboss/common.logging.log4j.lib}">
- <file name="jboss-logging-log4j.jar"/>
- </filelist>
- <filelist id="mc.jboss_common_core"
dir="${jboss/common.core.lib}">
- <file name="jboss-common-core.jar"/>
- </filelist>
- <filelist id="mc.jboss_vfs"
dir="${jboss/jboss.vfs.lib}">
- <file name="jboss-vfs.jar"/>
- </filelist>
- <filelist id="mc.jboss_xb" dir="${jboss.jbossxb.lib}">
- <file name="jboss-xml-binding.jar"/>
- </filelist>
- <filelist id="mc.jboss_aop" dir="${jboss.aop.lib}">
- <file name="jboss-aop-as4-deployer.jar"/>
- <file name="jboss-aop-deployer-jdk50.jar"/>
- <file name="jboss-aop-jdk50.jar"/>
- <file name="jboss-aop-jdk50-client.jar"/>
- <file name="jboss-standalone-aspect-library-jdk50.jar"/>
- <file name="jrockit-pluggable-instrumentor.jar"/>
- <file name="pluggable-instrumentor.jar"/>
- </filelist>
- <filelist id="mc.jboss_microcontainer"
dir="${jboss.microcontainer.lib}">
- <file name="jboss-aop-mc-int.jar"/>
- <file name="jboss-classloader.jar"/>
- <file name="jboss-container.jar"/>
- <file name="jboss-container-metadata.jar"/>
- <file name="jboss-container-metadata-spi.jar"/>
- <file name="jboss-dependency.jar"/>
- <file name="jboss-deployers-core.jar"/>
- <file name="jboss-deployers-core-spi.jar"/>
- <file name="jboss-deployers-client.jar"/>
- <file name="jboss-deployers-client-spi.jar"/>
- <file name="jboss-deployers-impl.jar"/>
- <file name="jboss-deployers-spi.jar"/>
- <file name="jboss-deployers-structure-spi.jar"/>
- <file name="jboss-deployers-vfs.jar"/>
- <file name="jboss-deployers-vfs-spi.jar"/>
- <file name="jboss-managed.jar"/>
- <file name="jboss-metatype.jar"/>
- <file name="jboss-kernel.jar"/>
- </filelist>
-
- <!-- **************************** -->
- <!-- Tomcat 6.0 container servlet -->
- <!-- **************************** -->
-
- <!-- -->
- <copy
todir="${build.resources}/test/support/tomcat-6.0-container-servlet/server-war/WEB-INF/lib">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-mc-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="jboss-unit-lib.jar,jboss-unit-mc-lib.jar,jboss-unit-remote-lib.jar,portal-test-generic-lib.jar,portal-test-lib.jar"/>
- <fileset dir="${jboss.remoting.lib}"
includes="jboss-remoting.jar"/>
- <fileset dir="${apache.log4j.lib}"
includes="log4j.jar"/>
- <filelist refid="mc.concurrent"/>
- <filelist refid="mc.trove"/>
- <filelist refid="mc.xerces"/>
- <filelist refid="mc.javassist"/>
- <filelist refid="mc.jboss_common_logging_spi"/>
- <filelist refid="mc.jboss_common_logging_jdk"/>
- <filelist refid="mc.jboss_common_logging_log4j"/>
- <filelist refid="mc.jboss_common_core"/>
- <filelist refid="mc.jboss_vfs"/>
- <filelist refid="mc.jboss_xb"/>
- <filelist refid="mc.jboss_aop"/>
- <filelist refid="mc.jboss_microcontainer"/>
- </copy>
- <mkdir dir="${build.lib}/tomcat-6.0-container-servlet"/>
-
- <!-- **************************** -->
- <!-- Tomcat 6.0 lifecyle listener -->
- <!-- **************************** -->
-
- <!-- -->
- <copy
todir="${build.resources}/test/support/tomcat-6.0-lifecycle-listener/server-war/WEB-INF/lib">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-mc-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="jboss-unit-lib.jar,jboss-unit-mc-lib.jar,jboss-unit-remote-lib.jar,portal-test-generic-lib.jar,portal-test-lib.jar"/>
- <fileset dir="${jboss.remoting.lib}"
includes="jboss-remoting.jar"/>
- <fileset dir="${apache.log4j.lib}"
includes="log4j.jar"/>
- <filelist refid="mc.concurrent"/>
- <filelist refid="mc.trove"/>
- <filelist refid="mc.xerces"/>
- <filelist refid="mc.javassist"/>
- <filelist refid="mc.jboss_common_logging_spi"/>
- <filelist refid="mc.jboss_common_logging_jdk"/>
- <filelist refid="mc.jboss_common_logging_log4j"/>
- <filelist refid="mc.jboss_common_core"/>
- <filelist refid="mc.jboss_vfs"/>
- <filelist refid="mc.jboss_xb"/>
- <filelist refid="mc.jboss_aop"/>
- <filelist refid="mc.jboss_microcontainer"/>
- </copy>
- <mkdir dir="${build.lib}/tomcat-6.0-lifecycle-listener"/>
-
- <!-- ****************** -->
- <!-- Tomcat 6.0 generic -->
- <!-- ****************** -->
-
- <!-- -->
- <mkdir
dir="${build.resources}/test/support/tomcat-6.0-generic/server-war/WEB-INF/lib"/>
- <copy
todir="${build.resources}/test/support/tomcat-6.0-generic/server-war/WEB-INF/lib">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-mc-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="jboss-unit-lib.jar,jboss-unit-mc-lib.jar,jboss-unit-remote-lib.jar,portal-test-generic-lib.jar,portal-test-lib.jar"/>
- <fileset dir="${jboss.remoting.lib}"
includes="jboss-remoting.jar"/>
- <fileset dir="${apache.log4j.lib}"
includes="log4j.jar"/>
- <filelist refid="mc.concurrent"/>
- <filelist refid="mc.trove"/>
- <filelist refid="mc.xerces"/>
- <filelist refid="mc.javassist"/>
- <filelist refid="mc.jboss_common_logging_spi"/>
- <filelist refid="mc.jboss_common_logging_jdk"/>
- <filelist refid="mc.jboss_common_logging_log4j"/>
- <filelist refid="mc.jboss_common_core"/>
- <filelist refid="mc.jboss_vfs"/>
- <filelist refid="mc.jboss_xb"/>
- <filelist refid="mc.jboss_aop"/>
- <filelist refid="mc.jboss_microcontainer"/>
- </copy>
- <mkdir dir="${build.lib}/tomcat-6.0-generic"/>
-
- <!-- *************************** -->
- <!-- JBoss 4.2 container servlet -->
- <!-- *************************** -->
-
- <!-- -->
- <copy
todir="${build.resources}/test/support/jboss-4.2-container-servlet/server-war/WEB-INF/lib">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-mc-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-generic-lib.jar"/>
- <filelist refid="mc.trove"/>
- <filelist refid="mc.javassist"/>
- <filelist refid="mc.jboss_common_logging_spi"/>
- <filelist refid="mc.jboss_common_logging_jdk"/>
- <filelist refid="mc.jboss_common_logging_log4j"/>
- <filelist refid="mc.jboss_common_core"/>
- <filelist refid="mc.jboss_vfs"/>
- <filelist refid="mc.jboss_xb"/>
- <filelist refid="mc.jboss_aop"/>
- <filelist refid="mc.jboss_microcontainer"/>
- </copy>
- <mkdir dir="${build.lib}/jboss-4.2-container-servlet"/>
-
- <!-- ***************** -->
- <!-- JBoss 4.2 generic -->
- <!-- ***************** -->
-
- <!-- -->
- <copy
todir="${build.resources}/test/support/jboss-4.2-generic/server-war/WEB-INF/lib">
- <fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-mc-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-generic-lib.jar"/>
- <filelist refid="mc.trove"/>
- <filelist refid="mc.javassist"/>
- <filelist refid="mc.jboss_common_logging_spi"/>
- <filelist refid="mc.jboss_common_logging_jdk"/>
- <filelist refid="mc.jboss_common_logging_log4j"/>
- <filelist refid="mc.jboss_common_core"/>
- <filelist refid="mc.jboss_vfs"/>
- <filelist refid="mc.jboss_xb"/>
- <filelist refid="mc.jboss_aop"/>
- <filelist refid="mc.jboss_microcontainer"/>
- </copy>
- <mkdir dir="${build.lib}/jboss-4.2-generic"/>
-
- <!-- SPI Test case-->
-
- <jar jarfile="${build.lib}/portal-test-spi-lib.jar">
- <fileset dir="${build.classes}">
- <include name="org/jboss/portal/test/web/spi/**"/>
- <include
name="org/jboss/portal/test/web/ServletTestCase.class"/>
- <include
name="org/jboss/portal/test/web/TestServlet.class"/>
- <include
name="org/jboss/portal/test/web/WebAppRegistry.class"/>
- </fileset>
- <fileset dir="${build.resources}/portal-test-spi-jar"/>
- </jar>
-
- <war
jarfile="${build.lib}/tomcat-6.0-container-servlet/test-spi-server.war">
- <fileset
dir="${build.resources}/test/support/tomcat-6.0-container-servlet/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-spi-lib.jar"/>
- </war>
- <jar
jarfile="${build.lib}/tomcat-6.0-container-servlet/test-spi-app.war">
- <fileset dir="${build.resources}/test/spi/app-war"/>
- </jar>
- <war
jarfile="${build.lib}/tomcat-6.0-lifecycle-listener/test-spi-server.war">
- <fileset
dir="${build.resources}/test/support/tomcat-6.0-lifecycle-listener/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-spi-lib.jar"/>
- </war>
- <jar
jarfile="${build.lib}/tomcat-6.0-container-servlet/test-spi-app.war">
- <fileset dir="${build.resources}/test/spi/app-war"/>
- </jar>
- <war
jarfile="${build.lib}/tomcat-6.0-generic/test-spi-server.war">
- <fileset
dir="${build.resources}/test/support/tomcat-6.0-generic/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-spi-lib.jar"/>
- </war>
- <jar jarfile="${build.lib}/tomcat-6.0-generic/test-spi-app.war">
- <fileset dir="${build.resources}/test/spi/generic/app-war"/>
- </jar>
- <war
jarfile="${build.lib}/jboss-4.2-container-servlet/test-spi-server.war">
- <fileset
dir="${build.resources}/test/support/jboss-4.2-container-servlet/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-spi-lib.jar"/>
- </war>
- <jar
jarfile="${build.lib}/jboss-4.2-container-servlet/test-spi-app.war">
- <fileset dir="${build.resources}/test/spi/app-war"/>
- </jar>
- <war jarfile="${build.lib}/jboss-4.2-generic/test-spi-server.war">
- <fileset
dir="${build.resources}/test/support/jboss-4.2-generic/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-spi-lib.jar"/>
- </war>
- <jar jarfile="${build.lib}/jboss-4.2-generic/test-spi-app.war">
- <fileset dir="${build.resources}/test/spi/generic/app-war"/>
- </jar>
-
- <!-- Request Test case-->
-
- <jar jarfile="${build.lib}/portal-test-request-lib.jar">
- <fileset dir="${build.classes}">
- <include name="org/jboss/portal/test/web/request/**"/>
- <include
name="org/jboss/portal/test/web/ServletTestCase.class"/>
- <include
name="org/jboss/portal/test/web/TestServlet.class"/>
- <include
name="org/jboss/portal/test/web/WebAppRegistry.class"/>
- </fileset>
- <fileset dir="${build.resources}/portal-test-request-jar"/>
- </jar>
-
- <war
jarfile="${build.lib}/tomcat-6.0-container-servlet/test-request-server.war">
- <fileset
dir="${build.resources}/test/support/tomcat-6.0-container-servlet/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-request-lib.jar"/>
- </war>
-
- <war
jarfile="${build.lib}/jboss-4.2-container-servlet/test-request-server.war">
- <fileset
dir="${build.resources}/test/support/jboss-4.2-container-servlet/server-war"/>
- <lib dir="${build.lib}"
includes="portal-test-request-lib.jar"/>
- </war>
-
- </target>
-
- <target name="cargo.setup" depends="init">
- <property name="cargo.log.dir"
value="${module.output}/cargo"/>
- <mkdir dir="${cargo.log.dir}"/>
- <taskdef resource="cargo.tasks">
- <classpath>
- <path refid="codehaus.cargo.classpath"/>
- </classpath>
- </taskdef>
- </target>
-
- <target name="cargo.jboss-4.2.start" depends="cargo.setup">
- <!-- The lib portal-test-lib.jar must be loaded at the shared level rather than
in the war file
- otherwise it is somehow inspected and produce a NoClassDefFoundError in the
web service integration
- layer on the class
org/jboss/portal/test/framework/driver/remote/RemoteTestDriver for some unknown
- reason, the class initiating the loading of the RemoteTestDriver class is
-
org.jboss.ws.integration.jboss42.DeployerInterceptorJSE.isWebserviceDeployment(DeployerInterceptorJSE.java:84)
- -->
- <cargo
- containerId="jboss42x"
- home="${test.jboss-4.2.home}"
- output="${cargo.log.dir}/cargo.${test.id}.server.log"
- log="${cargo.log.dir}/cargo.${test.id}.shutdown.log"
- action="start"
- wait="${cargo.wait}">
- <sharedClasspath>
- <path
location="${jboss.portal/modules/common.lib}/portal-common-lib.jar"/>
- <path
location="${jboss.portal/modules/test.lib}/jboss-unit-lib.jar"/>
- <path
location="${jboss.portal/modules/test.lib}/jboss-unit-remote-lib.jar"/>
- <path location="${build.lib}/portal-web-lib.jar"/>
- </sharedClasspath>
- <configuration>
- <property name="cargo.servlet.port" value="8080"/>
- <property name="cargo.logging" value="high"/>
- <deployable type="war"
file="${test.spi.server.path}"/>
- </configuration>
- </cargo>
- </target>
-
- <target name="cargo.jboss-4.2.stop" depends="cargo.setup">
- <cargo
- containerId="jboss42x"
- home="${test.jboss-4.2.home}"
- log="${cargo.log.dir}/cargo.${test.id}.startup.log"
- action="stop">
- <configuration>
- <property name="cargo.rmi.port" value="1099"/>
- </configuration>
- </cargo>
- </target>
-
- <target name="tests.jboss-4.2.container-servlet" depends="init"
if="${test.jboss-4.2.home.variable-name}">
- <echo message="Starting JBoss 4.2 container-servlet tests with
${test.jboss-4.2.home}"/>
- <antcall target="cargo.jboss-4.2.start">
- <param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path"
value="${test.archive.path}"/>
- </antcall>
- <antcall target="tests.remote">
- <param name="test.server.name"
value="${test.jboss-4.2.name}"/>
- <param name="test.deploy.name"
value="jboss-4.2-container-servlet"/>
- </antcall>
- <antcall target="cargo.jboss-4.2.stop">
- </antcall>
- </target>
-
- <target name="tests.jboss-4.2.generic" depends="init"
if="${test.jboss-4.2.home.variable-name}">
- <echo message="Starting JBoss 4.2 generic tests with
${test.jboss-4.2.home}"/>
- <antcall target="cargo.jboss-4.2.start">
- <param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path"
value="${test.archive.path}"/>
- </antcall>
- <antcall target="tests.remote">
- <param name="test.server.name"
value="${test.jboss-4.2.name}"/>
- <param name="test.deploy.name"
value="jboss-4.2-generic"/>
- </antcall>
- <antcall target="cargo.jboss-4.2.stop">
- </antcall>
- </target>
-
- <target name="tests.jboss-4.2" depends="init">
- <fail message="Please set the environment variable JBOSS_4_2_0_HOME or
JBOSS_4_2_1_HOME">
- <condition>
- <and>
- <not>
- <isset property="jboss-4.2.0.home"/>
- </not>
- <not>
- <isset property="jboss-4.2.1.home"/>
- </not>
- </and>
- </condition>
- </fail>
- <antcall target="tests.jboss-4.2.container-servlet">
- <param name="test.id"
value="JBoss-4_2_0-spi-container-servlet"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_0"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.0.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-container-servlet/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.jboss-4.2.container-servlet">
- <param name="test.id"
value="JBoss-4_2_1-spi-container-servlet"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_1"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.1.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.1.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-container-servlet/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.jboss-4.2.generic">
- <param name="test.id"
value="JBoss-4_2_0-spi-generic"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_0"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.0.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-generic/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.jboss-4.2.generic">
- <param name="test.id"
value="JBoss-4_2_1-spi-generic"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_1"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.1.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.1.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-generic/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.jboss-4.2.container-servlet">
- <param name="test.id"
value="JBoss-4_2_0-request-container-servlet"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_0"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.0.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-container-servlet/test-request-server.war"/>
- </antcall>
- <antcall target="tests.jboss-4.2.container-servlet">
- <param name="test.id"
value="JBoss-4_2_1-request-container-servlet"/>
- <param name="test.jboss-4.2.name"
value="RemoteJBoss_4_2_1"/>
- <param name="test.jboss-4.2.home"
value="${jboss-4.2.1.home}"/>
- <param name="test.jboss-4.2.home.variable-name"
value="jboss-4.2.1.home"/>
- <param name="test.archive.path"
value="${build.lib}/jboss-4.2-container-servlet/test-request-server.war"/>
- </antcall>
- </target>
-
- <target name="tests.jboss" depends="init">
- <antcall target="tests.jboss-4.2">
- </antcall>
- </target>
-
- <target name="cargo.tomcat-6.start" depends="cargo.setup">
- <cargo
- containerId="tomcat5x"
- home="${test.tomcat-6.home}"
- output="${cargo.log.dir}/cargo.${test.id}.server.log"
- log="${cargo.log.dir}/cargo.${test.id}.start.log"
- action="start"
- wait="${cargo.wait}">
- <sharedClasspath>
- <path location="${apache.log4j.lib}/log4j.jar"/>
- <path location="${oswego.concurrent.lib}/concurrent.jar"/>
- <path
location="${jboss.portal/modules/common.lib}/portal-common-lib.jar"/>
- <path location="${sun.jaf.lib}/activation.jar"/>
- <path location="${junit.junit.lib}/junit.jar"/>
- <path location="${build.lib}/portal-web-lib.jar"/>
- </sharedClasspath>
- <configuration>
- <property name="cargo.servlet.port" value="8080"/>
- <property name="cargo.logging" value="high"/>
- <!--<property name="cargo.jvmargs" value="-Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
- <deployable type="war"
file="${codehaus.cargo.lib}/manager.war"/>
- <deployable type="war"
file="${test.spi.server.path}"/>
- </configuration>
- </cargo>
- </target>
-
- <target name="cargo.tomcat-6.stop" depends="cargo.setup">
- <cargo
- containerId="tomcat5x"
- home="${test.tomcat-6.home}"
- log="${cargo.log.dir}/cargo.${test.id}.shutdown.log"
- action="stop">
- <configuration>
- </configuration>
- </cargo>
- </target>
-
- <target name="tests.tomcat-6.container-servlet" depends="init"
if="${test.tomcat-6.home.variable-name}">
- <echo message="Starting Tomcat 6 container-servlet tests with
${test.tomcat-6.home}"/>
- <antcall target="cargo.tomcat-6.start">
- <param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path"
value="${test.archive.path}"/>
- </antcall>
- <antcall target="tests.remote">
- <param name="test.server.name"
value="RemoteTomcat_6_0"/>
- <param name="test.deploy.name"
value="tomcat-6.0-container-servlet"/>
- </antcall>
- <antcall target="cargo.tomcat-6.stop">
- </antcall>
- </target>
-
- <target name="tests.tomcat-6.generic" depends="init"
if="${test.tomcat-6.home.variable-name}">
- <fail unless="test.tomcat-6.home" message="Please set the
environment variable TOMCAT_6_0_HOME"/>
- <echo message="Starting Tomcat 6 generic tests with
${test.tomcat-6.home}"/>
- <antcall target="cargo.tomcat-6.start">
- <param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path"
value="${test.archive.path}"/>
- </antcall>
- <antcall target="tests.remote">
- <param name="test.server.name"
value="RemoteTomcat_6_0"/>
- <param name="test.deploy.name"
value="tomcat-6.0-generic"/>
- </antcall>
- <antcall target="cargo.tomcat-6.stop">
- </antcall>
- </target>
-
- <target name="tests.tomcat-6" depends="init">
- <fail message="Please set the environment variable
TOMCAT_6_0_HOME">
- <condition>
- <and>
- <not>
- <isset property="tomcat-6.0.home"/>
- </not>
- </and>
- </condition>
- </fail>
- <antcall target="tests.tomcat-6.container-servlet">
- <param name="test.id"
value="Tomcat-6_0-spi-container-servlet"/>
- <param name="test.tomcat-6.name"
value="RemoteTomcat_6_0"/>
- <param name="test.tomcat-6.home"
value="${tomcat-6.0.home}"/>
- <param name="test.tomcat-6.home.variable-name"
value="tomcat-6.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/tomcat-6.0-container-servlet/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.tomcat-6.generic">
- <param name="test.id"
value="Tomcat-6_0-spi-generic"/>
- <param name="test.tomcat-6.name"
value="RemoteTomcat_6_0"/>
- <param name="test.tomcat-6.home"
value="${tomcat-6.0.home}"/>
- <param name="test.tomcat-6.home.variable-name"
value="tomcat-6.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/tomcat-6.0-generic/test-spi-server.war"/>
- </antcall>
- <antcall target="tests.tomcat-6.container-servlet">
- <param name="test.id"
value="Tomcat-6_0-request-container-servlet"/>
- <param name="test.tomcat-6.name"
value="RemoteTomcat_6_0"/>
- <param name="test.tomcat-6.home"
value="${tomcat-6.0.home}"/>
- <param name="test.tomcat-6.home.variable-name"
value="tomcat-6.0.home"/>
- <param name="test.archive.path"
value="${build.lib}/tomcat-6.0-container-servlet/test-request-server.war"/>
- </antcall>
- </target>
-
- <target name="tests" depends="init">
- <antcall target="tests.local"/>
- <antcall target="tests.jboss-4.2"/>
- <antcall target="tests.tomcat-6"/>
- </target>
-
- <target name="tests.local" depends="init">
-
-
- <path id="jboss.unit.tooling.test.classpath">
- <pathelement
location="${jboss.portal/modules/test.lib}/jboss-unit-tooling-lib.jar"/>
- </path>
-
- <taskdef
- name="jboss-unit"
- classname="org.jboss.unit.tooling.ant.JBossUnitTask"
- classpathref="jboss.unit.tooling.test.classpath"/>
-
- <jboss-unit>
-
- <tests config="${build.resources}/test/local-jboss-unit.xml">
- </tests>
-
- <reports>
- <xml toDir="output/tests/xml/local"/>
- <html toDir="output/tests/html/local"/>
- </reports>
-
- <classpath>
- <pathelement location="${build.resources}/test/config"/>
- <path refid="jboss.portal/modules/common.classpath"/>
- <path refid="jboss.portal/modules/test.classpath"/>
- <pathelement location="${build.lib}/portal-web-lib.jar"/>
- <pathelement
location="${build.lib}/portal-web-test-lib.jar"/>
-
- <path location="../tools/lib/ant.jar"/>
- <path location="../tools/lib/ant-launcher.jar"/>
-
- <path refid="apache.log4j.classpath"/>
- <path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.remoting.classpath"/>
- <path refid="jboss.microcontainer.classpath"/>
- <path refid="jboss.aop.classpath"/>
- <path refid="jboss/jboss.vfs.classpath"/>
- <path refid="jboss/common.core.classpath"/>
- <path refid="jboss/common.logging.log4j.classpath"/>
- <path refid="jboss/common.logging.jdk.classpath"/>
- <path refid="jboss/common.logging.spi.classpath"/>
- <path refid="trove.trove.classpath"/>
- <path refid="javassist.javassist.classpath"/>
- <path refid="jboss.jbossxb.classpath"/>
- <path refid="apache.xerces.classpath"/>
- <path refid="apache.httpclient.classpath"/>
- <path refid="apache.logging.classpath"/>
- <path refid="apache.codec.classpath"/>
- <path refid="codehaus.cargo.classpath"/>
- </classpath>
-
- </jboss-unit>
-
- </target>
-
-
- <target name="tests.remote" depends="init">
-
-
- <path id="jboss.unit.tooling.test.classpath">
- <pathelement
location="${jboss.portal/modules/test.lib}/jboss-unit-tooling-lib.jar"/>
- </path>
-
- <taskdef
- name="jboss-unit"
- classname="org.jboss.unit.tooling.ant.JBossUnitTask"
- classpathref="jboss.unit.tooling.test.classpath"/>
-
- <jboss-unit>
-
- <tests config="${build.resources}/test/remote-jboss-unit.xml">
- <property name="archivePath"
value="${build.lib}/${test.deploy.name}"/>
- <property name="serverName"
value="${test.server.name}"/>
- </tests>
-
- <reports>
- <xml
toDir="output/tests/xml/${test.server.name}-${test.deploy.name}"/>
- <html
toDir="output/tests/html/${test.server.name}-${test.deploy.name}"/>
- </reports>
-
- <classpath>
- <pathelement location="${build.resources}/test/config"/>
- <path refid="jboss.portal/modules/common.classpath"/>
- <path refid="jboss.portal/modules/test.classpath"/>
- <pathelement location="${build.lib}/portal-web-lib.jar"/>
- <pathelement
location="${build.lib}/portal-web-test-lib.jar"/>
-
- <path location="../tools/lib/ant.jar"/>
- <path location="../tools/lib/ant-launcher.jar"/>
-
- <path refid="apache.log4j.classpath"/>
- <path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.remoting.classpath"/>
- <path refid="jboss.microcontainer.classpath"/>
- <path refid="jboss.aop.classpath"/>
- <path refid="jboss/jboss.vfs.classpath"/>
- <path refid="jboss/common.core.classpath"/>
- <path refid="jboss/common.logging.log4j.classpath"/>
- <path refid="jboss/common.logging.jdk.classpath"/>
- <path refid="jboss/common.logging.spi.classpath"/>
- <path refid="trove.trove.classpath"/>
- <path refid="javassist.javassist.classpath"/>
- <path refid="jboss.jbossxb.classpath"/>
- <path refid="apache.xerces.classpath"/>
- <path refid="apache.httpclient.classpath"/>
- <path refid="apache.logging.classpath"/>
- <path refid="apache.codec.classpath"/>
- <path refid="codehaus.cargo.classpath"/>
- </classpath>
-
- </jboss-unit>
-
- </target>
-
-</project>
Added: modules/web/trunk/web/pom.xml
===================================================================
--- modules/web/trunk/web/pom.xml (rev 0)
+++ modules/web/trunk/web/pom.xml 2007-12-16 17:33:17 UTC (rev 9352)
@@ -0,0 +1,395 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>jboss-portal-modules-web</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>portal-web</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Unit</name>
+
+ <dependencies>
+
+ <dependency>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>apache-tomcat</groupId>
+ <artifactId>catalina</artifactId>
+ </dependency>
+
+
+ <!-- SCOPE TEST -->
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common-mc</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-remote</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-mc</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-ant</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test-generic</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>resolver</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-jdk</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-managed</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-metatype</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-as4-deployer</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-deployer-jdk50</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-jdk50</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-aop-jdk50-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jboss-standalone-aspect-library-jdk50</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>jrockit-pluggable-instrumentor</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.aop</groupId>
+ <artifactId>pluggable-instrumentor</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-manager</artifactId>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-property</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>JBOSS_HOME_4_2_1</property>
+ <message>"You must specify JBoss Application Server
installation directory using -DJBOSS_HOME_4_2_1=... command line
argument"</message>
+ </requireProperty>
+ <requireProperty>
+ <property>TOMCAT_6_0_HOME</property>
+ <message>"You must specify Tomcat installation
directory using -DTOMCAT_6_0_HOME=... command line argument"</message>
+ </requireProperty>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <version>1.9-SNAPSHOT</version>
+
+ <dependencies>
+
+ <!--Nessesary to force antrun plugin to support ant 1.7.0
features...-->
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>${version.ant}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${version.ant}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-ant</artifactId>
+ <version>${version.jboss.unit}</version>
+ </dependency>
+
+ <!-- stuff to run servers for tests -->
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-ant</artifactId>
+ <version>${version.cargo}</version>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>cargo-core-uberjar</artifactId>
+ <version>${version.cargo}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <tasks>
+
+ <property name="compile_classpath"
refid="maven.compile.classpath"/>
+ <property name="runtime_classpath"
refid="maven.runtime.classpath"/>
+ <property name="test_classpath"
refid="maven.test.classpath"/>
+ <property name="plugin_classpath"
refid="maven.plugin.classpath"/>
+
+ <property name="jboss_home"
value="${JBOSS_HOME_4_2_1}"/>
+ <property name="tomcat_home"
value="${TOMCAT_6_0_HOME}"/>
+
+ <property name="project.version"
value="${project.version}"/>
+
+ <property name="dependency.concurrent.jar"
value="${maven.dependency.concurrent.concurrent.jar.path}"/>
+ <property name="dependency.trove.jar"
value="${maven.dependency.trove.trove.jar.path}"/>
+ <property name="dependency.jboss-logging-spi.jar"
value="${maven.dependency.jboss.jboss-logging-spi.jar.path}"/>
+ <property name="dependency.jboss-logging-jdk.jar"
value="${maven.dependency.jboss.jboss-logging-jdk.jar.path}"/>
+ <property name="dependency.jboss-logging-log4j.jar"
value="${maven.dependency.jboss.jboss-logging-log4j.jar.path}"/>
+ <property name="dependency.jboss-vfs.jar"
value="${maven.dependency.jboss.jboss-vfs.jar.path}"/>
+ <property name="dependency.jboss-aop-mc-int.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-aop-mc-int.jar.path}"/>
+ <property name="dependency.jboss-classloader.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-classloader.jar.path}"/>
+ <property name="dependency.jboss-container.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-container.jar.path}"/>
+ <property name="dependency.jboss-dependency.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
+ <property
name="dependency.jboss-deployers-client-spi.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client-spi.jar.path}"/>
+ <property
name="dependency.jboss-deployers-client.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client.jar.path}"/>
+ <property
name="dependency.jboss-deployers-core-spi.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-core.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core.jar.path}"/>
+ <property name="dependency.jboss-deployers-impl.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-impl.jar.path}"/>
+ <property name="dependency.jboss-deployers-spi.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-spi.jar.path}"/>
+ <property
name="dependency.jboss-deployers-structure-spi.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-structure-spi.jar.path}"/>
+ <property
name="dependency.jboss-deployers-vfs-spi.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-vfs.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs.jar.path}"/>
+ <property name="dependency.jboss-kernel.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-kernel.jar.path}"/>
+ <property name="dependency.jboss-managed.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-managed.jar.path}"/>
+ <property name="dependency.jboss-metatype.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss.metatype.jar.path}"/>
+ <property
name="dependency.jboss-aop-as4-deployer.jar"
value="${maven.dependency.jboss.aop.jboss-aop-as4-deployer.jar.path}"/>
+ <property
name="dependency.jboss-aop-deployer-jdk50.jar"
value="${maven.dependency.jboss.aop.jboss-aop-deployer-jdk50.jar.path}"/>
+ <property name="dependency.jboss-aop-jdk50.jar"
value="${maven.dependency.jboss.aop.jboss-aop-jdk50.jar.path}"/>
+ <property
name="dependency.jboss-aop-jdk50-client.jar"
value="${maven.dependency.jboss.aop.jboss-aop-jdk50-client.jar.path}"/>
+ <property
name="dependency.jboss-standalone-aspect-library-jdk50.jar"
value="${maven.dependency.jboss.aop.jboss-standalone-aspect-library-jdk50.jar.path}"/>
+ <property
name="dependency.jrockit-pluggable-instrumentor.jar"
value="${maven.dependency.jboss.aop.jrockit-pluggable-instrumentor.jar.path}"/>
+ <property
name="dependency.pluggable-instrumentor.jar"
value="${maven.dependency.jboss.aop.pluggable-instrumentor.jar.path}"/>
+ <property name="dependency.javassist.jar"
value="${maven.dependency.org.jboss.javassist.jar.path}"/>
+ <property name="dependency.jboss-common-core.jar"
value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
+ <property name="dependency.resolver.jar"
value="${maven.dependency.apache-xerces.resolver.jar.path}"/>
+ <property name="dependency.xercesImpl.jar"
value="${maven.dependency.apache-xerces.xercesImpl.jar.path}"/>
+ <property name="dependency.xml-apis.jar"
value="${maven.dependency.apache-xerces.xml-apis.jar.path}"/>
+ <property name="dependency.jbossxb.jar"
value="${maven.dependency.jboss.jbossxb.jar.path}"/>
+ <property name="dependency.jboss-remoting.jar"
value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
+ <property name="dependency.portal-common.jar"
value="${maven.dependency.org.jboss.portal.common.jboss-portal-modules-common.jar.path}"/>
+ <property name="dependency.portal-common-mc.jar"
value="${maven.dependency.org.jboss.portal.common.jboss-portal-modules-common-mc.jar.path}"/>
+ <property name="dependency.jboss-unit.jar"
value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
+ <property name="dependency.jboss-unit-mc.jar"
value="${maven.dependency.org.jboss.unit.jboss-unit-mc.jar.path}"/>
+ <property name="dependency.jboss-unit-remote.jar"
value="${maven.dependency.org.jboss.unit.jboss-unit-remote.jar.path}"/>
+ <property name="dependency.portal-test.jar"
value="${maven.dependency.org.jboss.unit.portal-test.jar.path}"/>
+ <property name="dependency.portal-test-generic.jar"
value="${maven.dependency.org.jboss.unit.portal-test-generic.jar.path}"/>
+ <property name="dependency.log4j.jar"
value="${maven.dependency.log4j.log4j.jar.path}"/>
+ <property name="dependency.commons-logging.jar"
value="${maven.dependency.commons-logging.commons-logging.jar.path}"/>
+ <property name="dependency.commons-httpclient.jar"
value="${maven.dependency.commons-httpclient.commons-httpclient.jar.path}"/>
+ <property name="dependency.activation.jar"
value="${maven.dependency.javax.activation.activation.jar.path}"/>
+ <property name="dependency.junit.jar"
value="${maven.dependency.junit.junit.jar.path}"/>
+ <property name="dependency.cargo-manager.war"
value="${maven.dependency.cargo.cargo-manager.war.path}"/>
+
+ <ant antfile="${basedir}/src/test/build.xml">
+ <target name="tests"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ </properties>
+</project>
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web (from rev 9290,
modules/web/trunk/web/src/main/org/jboss/portal/web)
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/Body.java 2007-12-04 19:31:27 UTC
(rev 9290)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java 2007-12-16 17:33:17
UTC (rev 9352)
@@ -1,118 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import org.jboss.portal.common.util.ParameterMap;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.InputStream;
-import java.io.BufferedReader;
-import java.io.IOException;
-
-/**
- * The body of a request.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class Body
-{
-
- /** . */
- private final String characterEncoding;
-
- private Body(String characterEncoding)
- {
- this.characterEncoding = characterEncoding;
- }
-
- public String getCharacterEncoding()
- {
- return characterEncoding;
- }
-
- public static class Form extends Body
- {
-
- /** . */
- private final ParameterMap parameters;
-
- Form(String characterEncoding, ParameterMap parameters)
- {
- super(characterEncoding);
-
- //
- if (parameters == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parameters = parameters;
- }
-
- public ParameterMap getParameters()
- {
- return parameters;
- }
- }
-
- public static class Raw extends Body
- {
-
- /** . */
- private final HttpServletRequest request;
-
- /** . */
- private boolean consumed;
-
- Raw(String characterEncoding, HttpServletRequest request)
- {
- super(characterEncoding);
-
- //
- this.request = request;
- }
-
- public InputStream getInputStream() throws IOException
- {
- if (consumed)
- {
- throw new IllegalStateException();
- }
- consumed = true;
- return request.getInputStream();
- }
-
- public BufferedReader getReader() throws IOException
- {
- if (consumed)
- {
- throw new IllegalStateException();
- }
- consumed = true;
- return request.getReader();
- }
- }
-
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java (from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/Body.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java
(rev 0)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/Body.java 2007-12-16 17:33:17
UTC (rev 9352)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import org.jboss.portal.common.util.ParameterMap;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+
+/**
+ * The body of a request.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class Body
+{
+
+ /** . */
+ private final String characterEncoding;
+
+ private Body(String characterEncoding)
+ {
+ this.characterEncoding = characterEncoding;
+ }
+
+ public String getCharacterEncoding()
+ {
+ return characterEncoding;
+ }
+
+ public static class Form extends Body
+ {
+
+ /** . */
+ private final ParameterMap parameters;
+
+ Form(String characterEncoding, ParameterMap parameters)
+ {
+ super(characterEncoding);
+
+ //
+ if (parameters == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.parameters = parameters;
+ }
+
+ public ParameterMap getParameters()
+ {
+ return parameters;
+ }
+ }
+
+ public static class Raw extends Body
+ {
+
+ /** . */
+ private final HttpServletRequest request;
+
+ /** . */
+ private boolean consumed;
+
+ Raw(String characterEncoding, HttpServletRequest request)
+ {
+ super(characterEncoding);
+
+ //
+ this.request = request;
+ }
+
+ public InputStream getInputStream() throws IOException
+ {
+ if (consumed)
+ {
+ throw new IllegalStateException();
+ }
+ consumed = true;
+ return request.getInputStream();
+ }
+
+ public BufferedReader getReader() throws IOException
+ {
+ if (consumed)
+ {
+ throw new IllegalStateException();
+ }
+ consumed = true;
+ return request.getReader();
+ }
+ }
+
+}
Deleted:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class IllegalRequestException extends RuntimeException
-{
- public IllegalRequestException()
- {
- }
-
- public IllegalRequestException(String string)
- {
- super(string);
- }
-
- public IllegalRequestException(String string, Throwable throwable)
- {
- super(string, throwable);
- }
-
- public IllegalRequestException(Throwable throwable)
- {
- super(throwable);
- }
-}
Copied:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/IllegalRequestException.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class IllegalRequestException extends RuntimeException
+{
+ public IllegalRequestException()
+ {
+ }
+
+ public IllegalRequestException(String string)
+ {
+ super(string);
+ }
+
+ public IllegalRequestException(String string, Throwable throwable)
+ {
+ super(string, throwable);
+ }
+
+ public IllegalRequestException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Deleted:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/RequestDispatchCallback.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,54 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import java.io.IOException;
-
-/**
- * Callback contract.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface RequestDispatchCallback
-{
- /**
- * Performs the request dispatch logic.
- *
- * @param dispatchedServletContext the dispatched servlet context
- * @param dispatchedRequest the dispatched request
- * @param dispatchedResponse the dispatched response
- * @param handback the handback object provided to the dispatched @return any object
- * @throws ServletException if an exception occurs that interferes with the normal
operation
- * @throws IOException if an input or output exception occurs
- */
- Object doCallback(
- ServletContext dispatchedServletContext,
- HttpServletRequest dispatchedRequest,
- HttpServletResponse dispatchedResponse,
- Object handback) throws ServletException, IOException;
-}
Copied:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/RequestDispatchCallback.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/RequestDispatchCallback.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import java.io.IOException;
+
+/**
+ * Callback contract.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface RequestDispatchCallback
+{
+ /**
+ * Performs the request dispatch logic.
+ *
+ * @param dispatchedServletContext the dispatched servlet context
+ * @param dispatchedRequest the dispatched request
+ * @param dispatchedResponse the dispatched response
+ * @param handback the handback object provided to the dispatched @return any object
+ * @throws ServletException if an exception occurs that interferes with the normal
operation
+ * @throws IOException if an input or output exception occurs
+ */
+ Object doCallback(
+ ServletContext dispatchedServletContext,
+ HttpServletRequest dispatchedRequest,
+ HttpServletResponse dispatchedResponse,
+ Object handback) throws ServletException, IOException;
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContainer.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,348 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import org.jboss.portal.web.spi.ServletContainerContext;
-import org.jboss.portal.web.spi.WebAppContext;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * A static registry for the servlet container context.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ServletContainer
-{
-
- /** . */
- private final Object lock = new Object();
-
- /** The event listeners. */
- private final ArrayList listeners = new ArrayList();
-
- /** The web applications. */
- private final Map webAppMap = new HashMap();
-
- /** The callback. */
- private RegistrationImpl registration;
-
- /**
- * Register a servlet container context. The registration is considered as successful
if no existing context
- * is already registered.
- *
- * @param context the servlet container context to register
- * @throws IllegalArgumentException if the context is null
- */
- public void register(ServletContainerContext context)
- {
- synchronized(lock)
- {
- if (context == null)
- {
- throw new IllegalArgumentException("No null context accepted");
- }
-
- //
- if (registration == null)
- {
-
- registration = new RegistrationImpl(this, context);
-
- // Installs the call back
- context.setCallback(registration);
- }
- }
- }
-
- public boolean addWebAppListener(WebAppListener listener)
- {
- synchronized(lock)
- {
- if (listener == null)
- {
- throw new IllegalArgumentException();
- }
- if (listeners.contains(listener))
- {
- return false;
- }
- listeners.add(listener);
- for (Iterator i = webAppMap.values().iterator(); i.hasNext();)
- {
- WebApp webApp = (WebApp)i.next();
- WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.ADDED);
- safeFireEvent(listener, event);
- }
- return true;
- }
- }
-
- public boolean removeWebAppListener(WebAppListener listener)
- {
- synchronized(lock)
- {
- if (listener == null)
- {
- throw new IllegalArgumentException();
- }
- if (listeners.remove(listener))
- {
- for (Iterator i = webAppMap.values().iterator(); i.hasNext();)
- {
- WebApp webApp = (WebApp)i.next();
- WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED);
- safeFireEvent(listener, event);
- }
- return true;
- }
- else
- {
- return false;
- }
- }
- }
-
- private void safeFireEvent(WebAppListener listener, WebAppEvent event)
- {
- try
- {
- listener.onEvent(event);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- private void fireEvent(WebAppEvent event)
- {
- for (Iterator i = listeners.iterator();i.hasNext();)
- {
- safeFireEvent((WebAppListener)i.next(), event);
- }
- }
-
- /**
- * Generic detyped request dispatch to a servlet context using the include mechanism.
- *
- * @param targetServletContext the target servlet context to dispatch to
- * @param request the request valid in the current servlet context
- * @param response the response valid in the current servlet context
- * @param callback the callback to perform after the dispatch operation
- * @param handback the handback object to provide
- * @return any object
- * @throws Exception any exception
- */
- public Object include(
- ServletContext targetServletContext, HttpServletRequest request,
- HttpServletResponse response,
- RequestDispatchCallback callback,
- Object handback) throws ServletException, IOException
- {
- RegistrationImpl registration = this.registration;
-
- //
- if (registration == null)
- {
- throw new IllegalStateException("No SPI installed");
- }
-
- //
- return registration.context.include(targetServletContext, request, response,
callback, handback);
- }
-
- private static class RegistrationImpl implements ServletContainerContext.Registration
- {
-
- /** . */
- private boolean disposed;
-
- /** . */
- private ServletContainer container;
-
- /** . */
- private ServletContainerContext context;
-
- public RegistrationImpl(ServletContainer container, ServletContainerContext
context)
- {
- this.disposed = false;
- this.container = container;
- this.context = context;
- }
-
- public boolean registerWebApp(WebAppContext webAppContext)
- {
- if (disposed)
- {
- throw new IllegalStateException("Disposed registration");
- }
- synchronized(container.lock)
- {
- if (webAppContext == null)
- {
- throw new IllegalArgumentException("No null web app context
accepted");
- }
-
- //
- String key = webAppContext.getContextPath();
-
- //
- if (container.webAppMap.containsKey(key))
- {
- System.out.println("Web application " + key + " is already
registered");
- return false;
- }
- else
- {
- try
- {
- System.out.println("Web application " + key + "
registration");
- webAppContext.start();
- WebAppImpl webApp = new WebAppImpl(webAppContext);
- container.webAppMap.put(key, webApp);
- container.fireEvent(new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.ADDED));
- return true;
- }
- catch (Exception e)
- {
- System.out.println("Was not able to start web app context "+
key);
- e.printStackTrace();
- return false;
- }
- }
- }
- }
-
- public boolean unregisterWebApp(String webAppId)
- {
- if (disposed)
- {
- throw new IllegalStateException("Disposed registration");
- }
- synchronized(container.lock)
- {
- if (webAppId == null)
- {
- throw new IllegalArgumentException("No null web app id
accepted");
- }
-
- //
- WebAppImpl webApp = (WebAppImpl)container.webAppMap.remove(webAppId);
- if (webApp != null)
- {
- System.out.println("Web application " + webAppId + "
cleanup");
- container.fireEvent(new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED));
- webApp.context.stop();
- return true;
- }
- else
- {
- System.out.println("Web application " + webAppId + " was
not registered");
- return false;
- }
- }
- }
-
- public void cancel()
- {
- if (disposed)
- {
- throw new IllegalStateException("Disposed registration");
- }
- synchronized(container.lock)
- {
- // Unregister all web apps
- for (Iterator i = container.webAppMap.values().iterator(); i.hasNext();)
- {
- WebApp webApp = (WebApp)i.next();
- WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED);
- container.fireEvent(event);
- }
-
- //
- container.webAppMap.clear();
-
- // Uninstall the call back
- try
- {
- context.unsetCallback(this);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- // Update state
- context = null;
- disposed = true;
- container.registration = null;
- }
- }
- }
-
- /**
- * Implementation of the <code>WebApp</code> interface.
- */
- private static class WebAppImpl implements WebApp
- {
-
- /** . */
- final WebAppContext context;
-
- public WebAppImpl(WebAppContext context)
- {
- this.context = context;
- }
-
- public ServletContext getServletContext()
- {
- return context.getServletContext();
- }
-
- public ClassLoader getClassLoader()
- {
- return context.getClassLoader();
- }
-
- public String getContextPath()
- {
- return context.getContextPath();
- }
-
- public boolean importFile(String parentDirRelativePath, String name, InputStream
source, boolean overwrite) throws IOException
- {
- return context.importFile(parentDirRelativePath, name, source, overwrite);
- }
- }
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContainer.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainer.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,348 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import org.jboss.portal.web.spi.ServletContainerContext;
+import org.jboss.portal.web.spi.WebAppContext;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * A static registry for the servlet container context.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServletContainer
+{
+
+ /** . */
+ private final Object lock = new Object();
+
+ /** The event listeners. */
+ private final ArrayList listeners = new ArrayList();
+
+ /** The web applications. */
+ private final Map webAppMap = new HashMap();
+
+ /** The callback. */
+ private RegistrationImpl registration;
+
+ /**
+ * Register a servlet container context. The registration is considered as successful
if no existing context
+ * is already registered.
+ *
+ * @param context the servlet container context to register
+ * @throws IllegalArgumentException if the context is null
+ */
+ public void register(ServletContainerContext context)
+ {
+ synchronized(lock)
+ {
+ if (context == null)
+ {
+ throw new IllegalArgumentException("No null context accepted");
+ }
+
+ //
+ if (registration == null)
+ {
+
+ registration = new RegistrationImpl(this, context);
+
+ // Installs the call back
+ context.setCallback(registration);
+ }
+ }
+ }
+
+ public boolean addWebAppListener(WebAppListener listener)
+ {
+ synchronized(lock)
+ {
+ if (listener == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (listeners.contains(listener))
+ {
+ return false;
+ }
+ listeners.add(listener);
+ for (Iterator i = webAppMap.values().iterator(); i.hasNext();)
+ {
+ WebApp webApp = (WebApp)i.next();
+ WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.ADDED);
+ safeFireEvent(listener, event);
+ }
+ return true;
+ }
+ }
+
+ public boolean removeWebAppListener(WebAppListener listener)
+ {
+ synchronized(lock)
+ {
+ if (listener == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (listeners.remove(listener))
+ {
+ for (Iterator i = webAppMap.values().iterator(); i.hasNext();)
+ {
+ WebApp webApp = (WebApp)i.next();
+ WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED);
+ safeFireEvent(listener, event);
+ }
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+
+ private void safeFireEvent(WebAppListener listener, WebAppEvent event)
+ {
+ try
+ {
+ listener.onEvent(event);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private void fireEvent(WebAppEvent event)
+ {
+ for (Iterator i = listeners.iterator();i.hasNext();)
+ {
+ safeFireEvent((WebAppListener)i.next(), event);
+ }
+ }
+
+ /**
+ * Generic detyped request dispatch to a servlet context using the include mechanism.
+ *
+ * @param targetServletContext the target servlet context to dispatch to
+ * @param request the request valid in the current servlet context
+ * @param response the response valid in the current servlet context
+ * @param callback the callback to perform after the dispatch operation
+ * @param handback the handback object to provide
+ * @return any object
+ * @throws Exception any exception
+ */
+ public Object include(
+ ServletContext targetServletContext, HttpServletRequest request,
+ HttpServletResponse response,
+ RequestDispatchCallback callback,
+ Object handback) throws ServletException, IOException
+ {
+ RegistrationImpl registration = this.registration;
+
+ //
+ if (registration == null)
+ {
+ throw new IllegalStateException("No SPI installed");
+ }
+
+ //
+ return registration.context.include(targetServletContext, request, response,
callback, handback);
+ }
+
+ private static class RegistrationImpl implements ServletContainerContext.Registration
+ {
+
+ /** . */
+ private boolean disposed;
+
+ /** . */
+ private ServletContainer container;
+
+ /** . */
+ private ServletContainerContext context;
+
+ public RegistrationImpl(ServletContainer container, ServletContainerContext
context)
+ {
+ this.disposed = false;
+ this.container = container;
+ this.context = context;
+ }
+
+ public boolean registerWebApp(WebAppContext webAppContext)
+ {
+ if (disposed)
+ {
+ throw new IllegalStateException("Disposed registration");
+ }
+ synchronized(container.lock)
+ {
+ if (webAppContext == null)
+ {
+ throw new IllegalArgumentException("No null web app context
accepted");
+ }
+
+ //
+ String key = webAppContext.getContextPath();
+
+ //
+ if (container.webAppMap.containsKey(key))
+ {
+ System.out.println("Web application " + key + " is already
registered");
+ return false;
+ }
+ else
+ {
+ try
+ {
+ System.out.println("Web application " + key + "
registration");
+ webAppContext.start();
+ WebAppImpl webApp = new WebAppImpl(webAppContext);
+ container.webAppMap.put(key, webApp);
+ container.fireEvent(new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.ADDED));
+ return true;
+ }
+ catch (Exception e)
+ {
+ System.out.println("Was not able to start web app context "+
key);
+ e.printStackTrace();
+ return false;
+ }
+ }
+ }
+ }
+
+ public boolean unregisterWebApp(String webAppId)
+ {
+ if (disposed)
+ {
+ throw new IllegalStateException("Disposed registration");
+ }
+ synchronized(container.lock)
+ {
+ if (webAppId == null)
+ {
+ throw new IllegalArgumentException("No null web app id
accepted");
+ }
+
+ //
+ WebAppImpl webApp = (WebAppImpl)container.webAppMap.remove(webAppId);
+ if (webApp != null)
+ {
+ System.out.println("Web application " + webAppId + "
cleanup");
+ container.fireEvent(new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED));
+ webApp.context.stop();
+ return true;
+ }
+ else
+ {
+ System.out.println("Web application " + webAppId + " was
not registered");
+ return false;
+ }
+ }
+ }
+
+ public void cancel()
+ {
+ if (disposed)
+ {
+ throw new IllegalStateException("Disposed registration");
+ }
+ synchronized(container.lock)
+ {
+ // Unregister all web apps
+ for (Iterator i = container.webAppMap.values().iterator(); i.hasNext();)
+ {
+ WebApp webApp = (WebApp)i.next();
+ WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp,
WebAppLifeCycleEvent.REMOVED);
+ container.fireEvent(event);
+ }
+
+ //
+ container.webAppMap.clear();
+
+ // Uninstall the call back
+ try
+ {
+ context.unsetCallback(this);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ // Update state
+ context = null;
+ disposed = true;
+ container.registration = null;
+ }
+ }
+ }
+
+ /**
+ * Implementation of the <code>WebApp</code> interface.
+ */
+ private static class WebAppImpl implements WebApp
+ {
+
+ /** . */
+ final WebAppContext context;
+
+ public WebAppImpl(WebAppContext context)
+ {
+ this.context = context;
+ }
+
+ public ServletContext getServletContext()
+ {
+ return context.getServletContext();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return context.getClassLoader();
+ }
+
+ public String getContextPath()
+ {
+ return context.getContextPath();
+ }
+
+ public boolean importFile(String parentDirRelativePath, String name, InputStream
source, boolean overwrite) throws IOException
+ {
+ return context.importFile(parentDirRelativePath, name, source, overwrite);
+ }
+ }
+}
Deleted:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContainerFactory.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,41 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-/**
- * It's rather a provider rather than a real factory. But I prefer the factory name
than the provider name.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface ServletContainerFactory
-{
-
- /**
- * Returns the servlet container.
- *
- * @return
- */
- ServletContainer getServletContainer();
-
-}
Copied:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContainerFactory.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContainerFactory.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * It's rather a provider rather than a real factory. But I prefer the factory name
than the provider name.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ServletContainerFactory
+{
+
+ /**
+ * Returns the servlet container.
+ *
+ * @return
+ */
+ ServletContainer getServletContainer();
+
+}
Deleted:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContextDispatcher.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * Encapsulate dispatch functionnality into a single class so it is easy to
- * pass it as an argment to a framework that neeeds a dispatcher to just a
- * servlet context and does not care about the underlying spi or request/response.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ServletContextDispatcher
-{
-
- /** . */
- private final HttpServletRequest request;
-
- /** . */
- private final HttpServletResponse response;
-
- /** . */
- private final ServletContainer servletContainer;
-
- public ServletContextDispatcher(HttpServletRequest request, HttpServletResponse
response, ServletContainer servletContainer)
- {
- this.request = request;
- this.response = response;
- this.servletContainer = servletContainer;
- }
-
- public HttpServletRequest getRequest()
- {
- return request;
- }
-
- public HttpServletResponse getResponse()
- {
- return response;
- }
-
- public Object include(
- ServletContext targetServletContext,
- RequestDispatchCallback callback,
- Object handback) throws ServletException, IOException
- {
- return servletContainer.include(targetServletContext, request, response, callback,
handback);
- }
-
-}
Copied:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/ServletContextDispatcher.java)
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/ServletContextDispatcher.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * Encapsulate dispatch functionnality into a single class so it is easy to
+ * pass it as an argment to a framework that neeeds a dispatcher to just a
+ * servlet context and does not care about the underlying spi or request/response.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServletContextDispatcher
+{
+
+ /** . */
+ private final HttpServletRequest request;
+
+ /** . */
+ private final HttpServletResponse response;
+
+ /** . */
+ private final ServletContainer servletContainer;
+
+ public ServletContextDispatcher(HttpServletRequest request, HttpServletResponse
response, ServletContainer servletContainer)
+ {
+ this.request = request;
+ this.response = response;
+ this.servletContainer = servletContainer;
+ }
+
+ public HttpServletRequest getRequest()
+ {
+ return request;
+ }
+
+ public HttpServletResponse getResponse()
+ {
+ return response;
+ }
+
+ public Object include(
+ ServletContext targetServletContext,
+ RequestDispatchCallback callback,
+ Object handback) throws ServletException, IOException
+ {
+ return servletContainer.include(targetServletContext, request, response, callback,
handback);
+ }
+
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java 2007-12-04 19:31:27
UTC (rev 9290)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import javax.servlet.ServletContext;
-import java.net.URL;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * Abstraction of a web application.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface WebApp
-{
-
- /**
- * Returns the servlet context of the web application.
- *
- * @return the servlet context
- */
- ServletContext getServletContext();
-
- /**
- * Returns the class loader of the web application.
- *
- * @return the web application class loader
- */
- ClassLoader getClassLoader();
-
- /**
- * Returns the context path of the web application.
- *
- * @return the web application context path
- */
- String getContextPath();
-
- /**
- * Import a file in the war file. The file could not be created for some reasons which
are :
- * <ul>
- * <li>The parent dir exists and is a file</li>
- * <li>The parent dir does not exist and its creation failed</li>
- * <li>An underlying exception occurs when writing bytes from the source
<code>Inputstream</code> to the target
<code>OutputStream</code></li>
- * </ul>
- *
- * @param parentDirRelativePath the parent relative path in the web app starting from
the app root
- * @param name the name the created file should have
- * @param source the data of the target file
- * @param overwrite if false and the file already exists nothing is done
- * @return true if the file has been created
- * @throws IOException if the file cannot be created
- */
- boolean importFile(String parentDirRelativePath, String name, InputStream source,
boolean overwrite) throws IOException;
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java (from rev
9349, modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java
(rev 0)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebApp.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import javax.servlet.ServletContext;
+import java.net.URL;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * Abstraction of a web application.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface WebApp
+{
+
+ /**
+ * Returns the servlet context of the web application.
+ *
+ * @return the servlet context
+ */
+ ServletContext getServletContext();
+
+ /**
+ * Returns the class loader of the web application.
+ *
+ * @return the web application class loader
+ */
+ ClassLoader getClassLoader();
+
+ /**
+ * Returns the context path of the web application.
+ *
+ * @return the web application context path
+ */
+ String getContextPath();
+
+ /**
+ * Import a file in the war file. The file could not be created for some reasons which
are :
+ * <ul>
+ * <li>The parent dir exists and is a file</li>
+ * <li>The parent dir does not exist and its creation failed</li>
+ * <li>An underlying exception occurs when writing bytes from the source
<code>Inputstream</code> to the target
<code>OutputStream</code></li>
+ * </ul>
+ *
+ * @param parentDirRelativePath the parent relative path in the web app starting from
the app root
+ * @param name the name the created file should have
+ * @param source the data of the target file
+ * @param overwrite if false and the file already exists nothing is done
+ * @return true if the file has been created
+ * @throws IOException if the file cannot be created
+ */
+ boolean importFile(String parentDirRelativePath, String name, InputStream source,
boolean overwrite) throws IOException;
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppEvent.java 2007-12-04
19:31:27 UTC (rev 9290)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-/**
- * Base class for web application events.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public abstract class WebAppEvent
-{
-
- /** The web application. */
- private final WebApp webApp;
-
- /**
- * Construct a new web application event.
- *
- * @param webApp the web application
- * @throws IllegalArgumentException if the provided web application is null
- */
- public WebAppEvent(WebApp webApp) throws IllegalArgumentException
- {
- if (webApp == null)
- {
- throw new IllegalArgumentException("No null web application
accepted");
- }
- this.webApp = webApp;
- }
-
- /**
- * Returns the web application.
- *
- * @return the web application
- */
- public WebApp getWebApp()
- {
- return webApp;
- }
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java (from
rev 9349, modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppEvent.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java
(rev 0)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppEvent.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * Base class for web application events.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class WebAppEvent
+{
+
+ /** The web application. */
+ private final WebApp webApp;
+
+ /**
+ * Construct a new web application event.
+ *
+ * @param webApp the web application
+ * @throws IllegalArgumentException if the provided web application is null
+ */
+ public WebAppEvent(WebApp webApp) throws IllegalArgumentException
+ {
+ if (webApp == null)
+ {
+ throw new IllegalArgumentException("No null web application
accepted");
+ }
+ this.webApp = webApp;
+ }
+
+ /**
+ * Returns the web application.
+ *
+ * @return the web application
+ */
+ public WebApp getWebApp()
+ {
+ return webApp;
+ }
+}
Deleted:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java
===================================================================
---
modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppLifeCycleEvent.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-/**
- * Web application life cycle event.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WebAppLifeCycleEvent extends WebAppEvent
-{
-
- /** Application is removed. */
- public final static int REMOVED = 0;
-
- /** Application is added. */
- public final static int ADDED = 1;
-
- /** The type of the life cycle which can be <code>ADDED</code> or
<code>REMOVED</code> . */
- private final int type;
-
- /**
- * Creates a new web application life cycle event.
- *
- * @param webApp the web application
- * @param type the life cycle type
- * @throws IllegalArgumentException if the web application is null or the type value
is not valid
- */
- public WebAppLifeCycleEvent(WebApp webApp, int type)
- throws IllegalArgumentException
- {
- super(webApp);
-
- //
- if (type < REMOVED || type > ADDED)
- {
- throw new IllegalArgumentException("Type " + type + " not
accepted");
- }
-
- //
- this.type = type;
- }
-
- /**
- * Returns the life cycle type.
- *
- * @return the life cycle type
- */
- public int getType()
- {
- return type;
- }
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java
(from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppLifeCycleEvent.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppLifeCycleEvent.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * Web application life cycle event.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebAppLifeCycleEvent extends WebAppEvent
+{
+
+ /** Application is removed. */
+ public final static int REMOVED = 0;
+
+ /** Application is added. */
+ public final static int ADDED = 1;
+
+ /** The type of the life cycle which can be <code>ADDED</code> or
<code>REMOVED</code> . */
+ private final int type;
+
+ /**
+ * Creates a new web application life cycle event.
+ *
+ * @param webApp the web application
+ * @param type the life cycle type
+ * @throws IllegalArgumentException if the web application is null or the type value
is not valid
+ */
+ public WebAppLifeCycleEvent(WebApp webApp, int type)
+ throws IllegalArgumentException
+ {
+ super(webApp);
+
+ //
+ if (type < REMOVED || type > ADDED)
+ {
+ throw new IllegalArgumentException("Type " + type + " not
accepted");
+ }
+
+ //
+ this.type = type;
+ }
+
+ /**
+ * Returns the life cycle type.
+ *
+ * @return the life cycle type
+ */
+ public int getType()
+ {
+ return type;
+ }
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppListener.java 2007-12-04
19:31:27 UTC (rev 9290)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,40 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-/**
- * Defines the contract for listening web application events.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface WebAppListener
-{
-
- /**
- * Signal a web application event to the listener.
- *
- * @param event the web application event
- */
- void onEvent(WebAppEvent event);
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java (from
rev 9349, modules/web/trunk/web/src/main/org/jboss/portal/web/WebAppListener.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebAppListener.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * Defines the contract for listening web application events.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface WebAppListener
+{
+
+ /**
+ * Signal a web application event to the listener.
+ *
+ * @param event the web application event
+ */
+ void onEvent(WebAppEvent event);
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebRequest.java 2007-12-04
19:31:27 UTC (rev 9290)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,218 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import org.jboss.portal.common.http.QueryStringParser;
-import org.jboss.portal.common.util.ParameterMap;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import java.util.Map;
-import java.nio.charset.Charset;
-import java.io.UnsupportedEncodingException;
-
-/**
- * Add useful information about an <code>HttpServletRequest</code>.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WebRequest extends HttpServletRequestWrapper
-{
-
- public enum Verb
- {
- GET,
- POST
- }
-
- /** . */
- public static final String APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE =
"application/x-www-form-urlencoded";
-
- /** . */
- public static final String MULTIPART_FORM_DATA_MEDIA_TYPE =
"multipart/form-data";
-
- /** . */
- public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
-
- /** . */
- private final ParameterMap queryParameterMap;
-
- /** . */
- private final Body body;
-
- /** . */
- private final Verb verb;
-
- /** . */
- private final String mediaType;
-
- public WebRequest(HttpServletRequest req) throws UnsupportedEncodingException,
IllegalRequestException
- {
- super(req);
-
- //
- Verb verb;
- if ("GET".equals(req.getMethod()))
- {
- verb = Verb.GET;
- }
- else if ("POST".equals(req.getMethod()))
- {
- verb = Verb.POST;
- }
- else
- {
- throw new IllegalRequestException("HTTP Method " + req.getMethod() +
" not accepted");
- }
-
- // Compute the media type in the content type
- String mediaType = retrieveMediaType(req.getContentType());
-
- // Parse the query string to have the get parameters
- // The resulting map has its parameters decoded from the x-www-form-url encoding
- ParameterMap queryParameterMap;
- String queryString = req.getQueryString();
- if (queryString != null)
- {
- queryParameterMap =
QueryStringParser.getInstance().parseQueryString(queryString);
- }
- else
- {
- queryParameterMap = new ParameterMap();
- }
-
- // Only affect the charset encoding if the servlet container will decode the
request
- Body body = null;
- if (verb == Verb.POST)
- {
- if (APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE.equals(mediaType))
- {
- // Now we must ensure that we have either an equals or a trailing space after
the media-type
- String characterEncoding = req.getCharacterEncoding();
- if (characterEncoding == null)
- {
- // Set out charset for the request
- req.setCharacterEncoding(UTF_8_CHARSET.name());
- }
- else
- {
- Charset charset = Charset.forName(characterEncoding);
- if (!UTF_8_CHARSET.equals(charset))
- {
- throw new IllegalRequestException("Charset " +
characterEncoding + " not accepted, it should be UTF8");
- }
- }
-
- //
- ParameterMap bodyParameterMap = new ParameterMap();
- for (Map.Entry<String, String[]> entry : ((Map<String,
String[]>)req.getParameterMap()).entrySet())
- {
- // Get param name
- String paramName = entry.getKey();
-
- // Values that are aggregated from the query string and the body
- String[] paramValues = entry.getValue();
-
- // Values decoded from the query string
- String[] queryValues = queryParameterMap.get(paramName);
- if (queryValues != null)
- {
- int bodyValuesLength = paramValues.length - queryValues.length;
- if (bodyValuesLength > 0)
- {
- String[] bodyValues = new String[bodyValuesLength];
- System.arraycopy(paramValues, queryValues.length, bodyValues, 0,
bodyValuesLength);
- bodyParameterMap.put(paramName, bodyValues);
- }
- }
- else
- {
- bodyParameterMap.put(paramName, paramValues);
- }
- }
-
- //
- body = new Body.Form(req.getCharacterEncoding(), bodyParameterMap);
- }
- else
- {
- body = new Body.Raw(req.getCharacterEncoding(), req);
- }
- }
-
- //
- this.verb = verb;
- this.queryParameterMap = new ParameterMap(queryParameterMap);
- this.body = body;
- this.mediaType = mediaType;
- }
-
- public Verb getVerb()
- {
- return verb;
- }
-
- public Charset getCharset()
- {
- return UTF_8_CHARSET;
- }
-
- public ParameterMap getQueryParameterMap()
- {
- return queryParameterMap;
- }
-
- public Body getBody()
- {
- return body;
- }
-
- public String getMediaType()
- {
- return mediaType;
- }
-
- private String retrieveMediaType(String contentType)
- {
- String mediaType = contentType;
-
- //
- if (mediaType != null)
- {
- // Remove any parameters
- int index = mediaType.indexOf(';');
- if (index != -1)
- {
- mediaType = contentType.substring(0, index);
- }
-
- // Trim
- mediaType = mediaType.trim();
-
- // Media type matching is case insensitive, so we convert to lower case
- mediaType = mediaType.toLowerCase();
- }
- return mediaType;
- }
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java (from rev
9349, modules/web/trunk/web/src/main/org/jboss/portal/web/WebRequest.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java
(rev 0)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebRequest.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,218 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import org.jboss.portal.common.http.QueryStringParser;
+import org.jboss.portal.common.util.ParameterMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import java.util.Map;
+import java.nio.charset.Charset;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Add useful information about an <code>HttpServletRequest</code>.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebRequest extends HttpServletRequestWrapper
+{
+
+ public enum Verb
+ {
+ GET,
+ POST
+ }
+
+ /** . */
+ public static final String APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE =
"application/x-www-form-urlencoded";
+
+ /** . */
+ public static final String MULTIPART_FORM_DATA_MEDIA_TYPE =
"multipart/form-data";
+
+ /** . */
+ public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
+
+ /** . */
+ private final ParameterMap queryParameterMap;
+
+ /** . */
+ private final Body body;
+
+ /** . */
+ private final Verb verb;
+
+ /** . */
+ private final String mediaType;
+
+ public WebRequest(HttpServletRequest req) throws UnsupportedEncodingException,
IllegalRequestException
+ {
+ super(req);
+
+ //
+ Verb verb;
+ if ("GET".equals(req.getMethod()))
+ {
+ verb = Verb.GET;
+ }
+ else if ("POST".equals(req.getMethod()))
+ {
+ verb = Verb.POST;
+ }
+ else
+ {
+ throw new IllegalRequestException("HTTP Method " + req.getMethod() +
" not accepted");
+ }
+
+ // Compute the media type in the content type
+ String mediaType = retrieveMediaType(req.getContentType());
+
+ // Parse the query string to have the get parameters
+ // The resulting map has its parameters decoded from the x-www-form-url encoding
+ ParameterMap queryParameterMap;
+ String queryString = req.getQueryString();
+ if (queryString != null)
+ {
+ queryParameterMap =
QueryStringParser.getInstance().parseQueryString(queryString);
+ }
+ else
+ {
+ queryParameterMap = new ParameterMap();
+ }
+
+ // Only affect the charset encoding if the servlet container will decode the
request
+ Body body = null;
+ if (verb == Verb.POST)
+ {
+ if (APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE.equals(mediaType))
+ {
+ // Now we must ensure that we have either an equals or a trailing space after
the media-type
+ String characterEncoding = req.getCharacterEncoding();
+ if (characterEncoding == null)
+ {
+ // Set out charset for the request
+ req.setCharacterEncoding(UTF_8_CHARSET.name());
+ }
+ else
+ {
+ Charset charset = Charset.forName(characterEncoding);
+ if (!UTF_8_CHARSET.equals(charset))
+ {
+ throw new IllegalRequestException("Charset " +
characterEncoding + " not accepted, it should be UTF8");
+ }
+ }
+
+ //
+ ParameterMap bodyParameterMap = new ParameterMap();
+ for (Map.Entry<String, String[]> entry : ((Map<String,
String[]>)req.getParameterMap()).entrySet())
+ {
+ // Get param name
+ String paramName = entry.getKey();
+
+ // Values that are aggregated from the query string and the body
+ String[] paramValues = entry.getValue();
+
+ // Values decoded from the query string
+ String[] queryValues = queryParameterMap.get(paramName);
+ if (queryValues != null)
+ {
+ int bodyValuesLength = paramValues.length - queryValues.length;
+ if (bodyValuesLength > 0)
+ {
+ String[] bodyValues = new String[bodyValuesLength];
+ System.arraycopy(paramValues, queryValues.length, bodyValues, 0,
bodyValuesLength);
+ bodyParameterMap.put(paramName, bodyValues);
+ }
+ }
+ else
+ {
+ bodyParameterMap.put(paramName, paramValues);
+ }
+ }
+
+ //
+ body = new Body.Form(req.getCharacterEncoding(), bodyParameterMap);
+ }
+ else
+ {
+ body = new Body.Raw(req.getCharacterEncoding(), req);
+ }
+ }
+
+ //
+ this.verb = verb;
+ this.queryParameterMap = new ParameterMap(queryParameterMap);
+ this.body = body;
+ this.mediaType = mediaType;
+ }
+
+ public Verb getVerb()
+ {
+ return verb;
+ }
+
+ public Charset getCharset()
+ {
+ return UTF_8_CHARSET;
+ }
+
+ public ParameterMap getQueryParameterMap()
+ {
+ return queryParameterMap;
+ }
+
+ public Body getBody()
+ {
+ return body;
+ }
+
+ public String getMediaType()
+ {
+ return mediaType;
+ }
+
+ private String retrieveMediaType(String contentType)
+ {
+ String mediaType = contentType;
+
+ //
+ if (mediaType != null)
+ {
+ // Remove any parameters
+ int index = mediaType.indexOf(';');
+ if (index != -1)
+ {
+ mediaType = contentType.substring(0, index);
+ }
+
+ // Trim
+ mediaType = mediaType.trim();
+
+ // Media type matching is case insensitive, so we convert to lower case
+ mediaType = mediaType.toLowerCase();
+ }
+ return mediaType;
+ }
+}
Deleted: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebResponse.java 2007-12-04
19:31:27 UTC (rev 9290)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -1,40 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portal.web;
-
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * todo
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WebResponse extends HttpServletResponseWrapper
-{
- public WebResponse(HttpServletResponse resp)
- {
- super(resp);
- }
-}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java (from
rev 9349, modules/web/trunk/web/src/main/org/jboss/portal/web/WebResponse.java)
===================================================================
--- modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java
(rev 0)
+++ modules/web/trunk/web/src/main/java/org/jboss/portal/web/WebResponse.java 2007-12-16
17:33:17 UTC (rev 9352)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+import javax.servlet.http.HttpServletResponseWrapper;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * todo
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebResponse extends HttpServletResponseWrapper
+{
+ public WebResponse(HttpServletResponse resp)
+ {
+ super(resp);
+ }
+}
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/command (from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/command)
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl (from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/impl)
Copied: modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi (from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/web/spi)
Copied: modules/web/trunk/web/src/test/java/org/jboss/portal/test (from rev 9246,
modules/web/trunk/web/src/main/org/jboss/portal/test)
Copied: modules/web/trunk/web/src/test/java/org/jboss/portal/test/web (from rev 9349,
modules/web/trunk/web/src/main/org/jboss/portal/test/web)
Copied: modules/web/trunk/web/src/test/resources/config (from rev 9246,
modules/web/trunk/web/src/resources/test/config)
Deleted: modules/web/trunk/web/src/test/resources/config/log4j.properties
===================================================================
--- modules/web/trunk/web/src/resources/test/config/log4j.properties 2007-12-03 14:20:08
UTC (rev 9246)
+++ modules/web/trunk/web/src/test/resources/config/log4j.properties 2007-12-16 17:33:17
UTC (rev 9352)
@@ -1,13 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration ##
-## ##
-### ====================================================================== ###
-
-log4j.rootCategory=ALL, CONSOLE
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=DEBUG
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Copied: modules/web/trunk/web/src/test/resources/config/log4j.properties (from rev 9349,
modules/web/trunk/web/src/resources/test/config/log4j.properties)
===================================================================
--- modules/web/trunk/web/src/test/resources/config/log4j.properties
(rev 0)
+++ modules/web/trunk/web/src/test/resources/config/log4j.properties 2007-12-16 17:33:17
UTC (rev 9352)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Deleted: modules/web/trunk/web/src/test/resources/config/servers.xml
===================================================================
--- modules/web/trunk/web/src/resources/test/config/servers.xml 2007-12-03 14:20:08 UTC
(rev 9246)
+++ modules/web/trunk/web/src/test/resources/config/servers.xml 2007-12-16 17:33:17 UTC
(rev 9352)
@@ -1,60 +0,0 @@
-<servers>
- <server>
- <server-name>RemoteTomcat_6_0</server-name>
- <node>
- <node-id>default</node-id>
- <service>
- <service-name>TestDriverServer</service-name>
-
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
- <uri>socket://localhost:5400</uri>
- </service>
- <deployer>
- <remote>
- <name>tomcat5x</name>
- <host>localhost</host>
- <port>8080</port>
- </remote>
- <authentication>
- <username>admin</username>
- <password>admin</password>
- </authentication>
- </deployer>
- </node>
- </server>
- <server>
- <server-name>RemoteJBoss_4_2_0</server-name>
- <node>
- <node-id>default</node-id>
- <service>
- <service-name>TestDriverServer</service-name>
-
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
- <uri>socket://localhost:5400</uri>
- </service>
- <deployer>
- <remote>
- <name>jboss4x</name>
- <host>localhost</host>
- <port>8080</port>
- </remote>
- </deployer>
- </node>
- </server>
- <server>
- <server-name>RemoteJBoss_4_2_1</server-name>
- <node>
- <node-id>default</node-id>
- <service>
- <service-name>TestDriverServer</service-name>
-
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
- <uri>socket://localhost:5400</uri>
- </service>
- <deployer>
- <remote>
- <name>jboss4x</name>
- <host>localhost</host>
- <port>8080</port>
- </remote>
- </deployer>
- </node>
- </server>
-</servers>
Copied: modules/web/trunk/web/src/test/resources/config/servers.xml (from rev 9349,
modules/web/trunk/web/src/resources/test/config/servers.xml)
===================================================================
--- modules/web/trunk/web/src/test/resources/config/servers.xml
(rev 0)
+++ modules/web/trunk/web/src/test/resources/config/servers.xml 2007-12-16 17:33:17 UTC
(rev 9352)
@@ -0,0 +1,60 @@
+<servers>
+ <server>
+ <server-name>RemoteTomcat_6_0</server-name>
+ <node>
+ <node-id>default</node-id>
+ <service>
+ <service-name>TestDriverServer</service-name>
+
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
+ <uri>socket://localhost:5400</uri>
+ </service>
+ <deployer>
+ <remote>
+ <name>tomcat5x</name>
+ <host>localhost</host>
+ <port>8080</port>
+ </remote>
+ <authentication>
+ <username>admin</username>
+ <password>admin</password>
+ </authentication>
+ </deployer>
+ </node>
+ </server>
+ <server>
+ <server-name>RemoteJBoss_4_2_0</server-name>
+ <node>
+ <node-id>default</node-id>
+ <service>
+ <service-name>TestDriverServer</service-name>
+
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
+ <uri>socket://localhost:5400</uri>
+ </service>
+ <deployer>
+ <remote>
+ <name>jboss4x</name>
+ <host>localhost</host>
+ <port>8080</port>
+ </remote>
+ </deployer>
+ </node>
+ </server>
+ <server>
+ <server-name>RemoteJBoss_4_2_1</server-name>
+ <node>
+ <node-id>default</node-id>
+ <service>
+ <service-name>TestDriverServer</service-name>
+
<interface>org.jboss.unit.remote.driver.RemoteTestDriver</interface>
+ <uri>socket://localhost:5400</uri>
+ </service>
+ <deployer>
+ <remote>
+ <name>jboss4x</name>
+ <host>localhost</host>
+ <port>8080</port>
+ </remote>
+ </deployer>
+ </node>
+ </server>
+</servers>
Copied: modules/web/trunk/web/src/test/resources/local-jboss-unit.xml (from rev 9246,
modules/web/trunk/web/src/resources/test/local-jboss-unit.xml)
===================================================================
--- modules/web/trunk/web/src/test/resources/local-jboss-unit.xml
(rev 0)
+++ modules/web/trunk/web/src/test/resources/local-jboss-unit.xml 2007-12-16 17:33:17 UTC
(rev 9352)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-unit
+ xmlns="urn:jboss:jboss-unit:1.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
+ <pojo>
+ <test>
+ <class
name="org.jboss.portal.test.web.container.ServletContainerTestCase"/>
+ </test>
+ </pojo>
+</jboss-unit>
Copied: modules/web/trunk/web/src/test/resources/portal-test-request-jar (from rev 9246,
modules/web/trunk/web/src/resources/portal-test-request-jar)
Copied: modules/web/trunk/web/src/test/resources/portal-test-request-jar/org (from rev
9349, modules/web/trunk/web/src/resources/portal-test-request-jar/org)
Copied: modules/web/trunk/web/src/test/resources/portal-test-spi-jar (from rev 9246,
modules/web/trunk/web/src/resources/portal-test-spi-jar)
Copied: modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org (from rev 9349,
modules/web/trunk/web/src/resources/portal-test-spi-jar/org)
Copied: modules/web/trunk/web/src/test/resources/remote-jboss-unit.xml (from rev 9246,
modules/web/trunk/web/src/resources/test/remote-jboss-unit.xml)
===================================================================
--- modules/web/trunk/web/src/test/resources/remote-jboss-unit.xml
(rev 0)
+++ modules/web/trunk/web/src/test/resources/remote-jboss-unit.xml 2007-12-16 17:33:17 UTC
(rev 9352)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-unit
+ xmlns="urn:jboss:jboss-unit:1.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
+ <generic>
+ <class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ </generic>
+</jboss-unit>
Copied: modules/web/trunk/web/src/test/resources/spi (from rev 9246,
modules/web/trunk/web/src/resources/test/spi)
Copied: modules/web/trunk/web/src/test/resources/spi/app-war (from rev 9349,
modules/web/trunk/web/src/resources/test/spi/app-war)
Copied: modules/web/trunk/web/src/test/resources/spi/generic (from rev 9349,
modules/web/trunk/web/src/resources/test/spi/generic)
Copied: modules/web/trunk/web/src/test/resources/support (from rev 9246,
modules/web/trunk/web/src/resources/test/support)
Copied: modules/web/trunk/web/src/test/resources/support/jboss-4.2-container-servlet (from
rev 9349, modules/web/trunk/web/src/resources/test/support/jboss-4.2-container-servlet)
Copied: modules/web/trunk/web/src/test/resources/support/jboss-4.2-generic (from rev 9349,
modules/web/trunk/web/src/resources/test/support/jboss-4.2-generic)
Copied: modules/web/trunk/web/src/test/resources/support/tomcat-6.0-container-servlet
(from rev 9349,
modules/web/trunk/web/src/resources/test/support/tomcat-6.0-container-servlet)
Copied: modules/web/trunk/web/src/test/resources/support/tomcat-6.0-generic (from rev
9349, modules/web/trunk/web/src/resources/test/support/tomcat-6.0-generic)
Copied: modules/web/trunk/web/src/test/resources/support/tomcat-6.0-lifecycle-listener
(from rev 9349,
modules/web/trunk/web/src/resources/test/support/tomcat-6.0-lifecycle-listener)