Author: julien(a)jboss.com
Date: 2008-04-04 07:53:43 -0400 (Fri, 04 Apr 2008)
New Revision: 10501
Added:
modules/presentation/trunk/classic/src/assemble/
modules/presentation/trunk/classic/src/assemble/presentation-war.xml
modules/presentation/trunk/classic/src/main/artifacts/
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/web.xml
Modified:
modules/presentation/trunk/classic/pom.xml
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java
Log:
added classic presentation war file creation using the assembly plugin
Modified: modules/presentation/trunk/classic/pom.xml
===================================================================
--- modules/presentation/trunk/classic/pom.xml 2008-04-04 00:14:10 UTC (rev 10500)
+++ modules/presentation/trunk/classic/pom.xml 2008-04-04 11:53:43 UTC (rev 10501)
@@ -74,6 +74,26 @@
<build>
<plugins>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <finalName>classic</finalName>
+ <descriptors>
+ <descriptor>src/assemble/presentation-war.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</project>
Added: modules/presentation/trunk/classic/src/assemble/presentation-war.xml
===================================================================
--- modules/presentation/trunk/classic/src/assemble/presentation-war.xml
(rev 0)
+++ modules/presentation/trunk/classic/src/assemble/presentation-war.xml 2008-04-04
11:53:43 UTC (rev 10501)
@@ -0,0 +1,33 @@
+<assembly>
+ <id>presentation</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+
+ <fileSet>
+ <directory>src/main/artifacts/presentation-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ </fileSet>
+
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>WEB-INF/lib</outputDirectory>
+ <includes>
+ <include>org.jboss.portal.common:common-common</include>
+ <include>org.jboss.portal.common:common-portal</include>
+
<include>org.jboss.portal.presentation:presentation-presentation</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
Added:
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/web.xml
===================================================================
---
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/web.xml
(rev 0)
+++
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/web.xml 2008-04-04
11:53:43 UTC (rev 10501)
@@ -0,0 +1,40 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app version="2.4"
+
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>ClassicPresentationServlet</servlet-name>
+
<servlet-class>org.jboss.portal.presentation.classic.ClassicPresentationServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ClassicPresentationServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-04
00:14:10 UTC (rev 10500)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-04
11:53:43 UTC (rev 10501)
@@ -48,7 +48,7 @@
// WebRequest webRequest = new WebRequest(req);
- ClassicPresentationClient client = new ClassicPresentationClient(req, resp);
+ ClassicPresentationClient client = new ClassicPresentationClient(req, resp,
server);
client.process();
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java 2008-04-04
00:14:10 UTC (rev 10500)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java 2008-04-04
11:53:43 UTC (rev 10501)
@@ -115,19 +115,22 @@
public void leaveObject(UIObject object)
{
- switch (pageStatus)
+ if (object instanceof UIPage)
{
- case NO_PAGE:
- throw new AssertionError();
- case DEFAULT_PAGE:
- pageStatus = NO_PAGE;
- break;
- case DEFAULT_PAGE_SIBLING:
- pageStatus = DEFAULT_PAGE;
- break;
- case DEFAULT_PAGE_CHILD:
- pageStatus = DEFAULT_PAGE;
- break;
+ switch (pageStatus)
+ {
+ case NO_PAGE:
+ throw new AssertionError();
+ case DEFAULT_PAGE:
+ pageStatus = NO_PAGE;
+ break;
+ case DEFAULT_PAGE_SIBLING:
+ pageStatus = DEFAULT_PAGE;
+ break;
+ case DEFAULT_PAGE_CHILD:
+ pageStatus = DEFAULT_PAGE;
+ break;
+ }
}
}
}