Author: mstruk
Date: 2011-04-23 17:19:45 -0400 (Sat, 23 Apr 2011)
New Revision: 6338
Added:
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/portlet-container-configuration.xml
Modified:
portal/trunk/packaging/jboss-as6/pkg/pom.xml
portal/trunk/packaging/jboss-as6/pkg/transform.xsl
Log:
GTNPORTAL-1874 Support for CDI (JSR-299) in portlets
- CDI packaging support for jboss-as6 - via additional build profile
Modified: portal/trunk/packaging/jboss-as6/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-04-23 20:19:24 UTC (rev 6337)
+++ portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-04-23 21:19:45 UTC (rev 6338)
@@ -1179,5 +1179,63 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>cdi</id>
+ <properties>
+ <profile>cdi</profile>
+
<org.gatein.cdi.version>1.0.0-Alpha01-SNAPSHOT</org.gatein.cdi.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <?profile cdi?>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-cdi</artifactId>
+ <version>${org.gatein.pc.version}</version>
+ </dependency>
+ <dependency>
+ <?profile cdi?>
+ <?move gatein-api.jar?>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-api</artifactId>
+ <version>${org.gatein.cdi.version}</version>
+ </dependency>
+ <dependency>
+ <?profile cdi?>
+ <?move gatein-cdi-example-portlet.war?>
+ <groupId>org.gatein.cdi</groupId>
+ <artifactId>gatein-cdi-example-portlet</artifactId>
+ <version>pong${org.gatein.cdi.version}</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <!-- Copy CDI specific configuration -->
+ <copy todir="${jbossas.target.dir}"
preservelastmodified="true" overwrite="true">
+ <fileset
dir="${project.basedir}/src/main/resources/cdi/jboss">
+ <include name="**/*.xml" />
+ </fileset>
+ </copy>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
Added:
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/portlet-container-configuration.xml
===================================================================
---
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/portlet-container-configuration.xml
(rev 0)
+++
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/cdi/jboss/server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/portlet-container-configuration.xml 2011-04-23
21:19:45 UTC (rev 6338)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+-->
+
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.gatein.pc.cdi.IntegrationService</key>
+ <type>org.gatein.pc.cdi.IntegrationService</type>
+ </component>
+ <component>
+ <key>org.exoplatform.portal.pc.ExoKernelIntegration</key>
+ <type>org.exoplatform.portal.pc.ExoKernelIntegration</type>
+ </component>
+
+</configuration>
Modified: portal/trunk/packaging/jboss-as6/pkg/transform.xsl
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/transform.xsl 2011-04-23 20:19:24 UTC (rev 6337)
+++ portal/trunk/packaging/jboss-as6/pkg/transform.xsl 2011-04-23 21:19:45 UTC (rev 6338)
@@ -8,6 +8,7 @@
<xsl:param name="default.ear.context"/>
<xsl:param name="lib.context"/>
<xsl:param name="deploy.context"/>
+ <xsl:param name="profile"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:comment>Generated file</xsl:comment>
@@ -20,6 +21,23 @@
</xsl:for-each>
</xsl:variable>
+ <xsl:variable name="active.for.profile">
+ <xsl:for-each
select="processing-instruction()[name()='profile']">
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="isActive">
+ <xsl:choose>
+ <xsl:when
test="$active.for.profile=''">true</xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="$active.for.profile=$profile">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="a_ext">
<xsl:for-each select="mvn:type">
<xsl:value-of select="text()"/>
@@ -73,60 +91,65 @@
</xsl:variable>
<xsl:choose>
- <xsl:when test="$expand=''">
+ <xsl:when test="$isActive='true'">
<xsl:choose>
- <xsl:when test="$dest.name=''">
- <xsl:element name="copy">
- <xsl:attribute name="todir">
- <xsl:value-of select="$context"/>
- </xsl:attribute>
- <xsl:element name="fileset">
- <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
-
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
- </xsl:attribute>
- </xsl:element>
- </xsl:element>
+
+ <xsl:when test="$expand=''">
+ <xsl:choose>
+ <xsl:when test="$dest.name=''">
+ <xsl:element name="copy">
+ <xsl:attribute name="todir">
+ <xsl:value-of select="$context"/>
+ </xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
+
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="copy">
+ <xsl:attribute
name="tofile"><xsl:value-of
select="$context"/>/<xsl:value-of select="$dest.name"/>
+ </xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
+
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:element name="copy">
- <xsl:attribute
name="tofile"><xsl:value-of
select="$context"/>/<xsl:value-of select="$dest.name"/>
- </xsl:attribute>
- <xsl:element name="fileset">
- <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
-
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
- </xsl:attribute>
- </xsl:element>
- </xsl:element>
+ <xsl:choose>
+ <xsl:when test="$dest.name=''">
+ <xsl:element name="unjar">
+ <xsl:attribute
name="dest"><xsl:value-of
select="$context"/>/<xsl:value-of
+
select="./mvn:artifactId"/>.<xsl:value-of select="$ext"/>
+ </xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
+
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="unjar">
+ <xsl:attribute
name="dest"><xsl:value-of
select="$context"/>/<xsl:value-of select="$dest.name"/>
+ </xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
+
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$dest.name=''">
- <xsl:element name="unjar">
- <xsl:attribute name="dest"><xsl:value-of
select="$context"/>/<xsl:value-of
-
select="./mvn:artifactId"/>.<xsl:value-of select="$ext"/>
- </xsl:attribute>
- <xsl:element name="fileset">
- <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
-
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
- </xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="unjar">
- <xsl:attribute name="dest"><xsl:value-of
select="$context"/>/<xsl:value-of select="$dest.name"/>
- </xsl:attribute>
- <xsl:element name="fileset">
- <xsl:attribute
name="refid"><xsl:value-of
select="./mvn:groupId"/>:<xsl:value-of
-
select="./mvn:artifactId"/>:<xsl:value-of select="$ext"/>
- </xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</target>