[gatein-commits] gatein SVN: r1104 - in portal/trunk: component/web/src/main/java/org/exoplatform/web and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Dec 21 09:57:36 EST 2009


Author: mstruk
Date: 2009-12-21 09:57:36 -0500 (Mon, 21 Dec 2009)
New Revision: 1104

Modified:
   portal/trunk/component/web/pom.xml
   portal/trunk/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java
   portal/trunk/packaging/pkg/pom.xml
Log:
GTNPORTAL-409 Added mc-integration interception

Modified: portal/trunk/component/web/pom.xml
===================================================================
--- portal/trunk/component/web/pom.xml	2009-12-21 14:39:23 UTC (rev 1103)
+++ portal/trunk/component/web/pom.xml	2009-12-21 14:57:36 UTC (rev 1104)
@@ -37,6 +37,12 @@
 
   <dependencies>
     <dependency>
+        <groupId>org.exoplatform.kernel</groupId>
+        <artifactId>exo.kernel.container</artifactId>
+        <version>${org.exoplatform.kernel.version}</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.exoplatform.core</groupId>
       <artifactId>exo.core.component.organization.api</artifactId>
     </dependency>

Modified: portal/trunk/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java	2009-12-21 14:39:23 UTC (rev 1103)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java	2009-12-21 14:57:36 UTC (rev 1104)
@@ -24,6 +24,7 @@
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.container.RootContainer;
 import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
+import org.exoplatform.container.util.EnvSpecific;
 import org.exoplatform.container.web.AbstractHttpSessionListener;
 import org.exoplatform.services.listener.ListenerService;
 import org.exoplatform.services.log.ExoLogger;
@@ -180,7 +181,17 @@
             }
          }
       };
-      RootContainer.getInstance().addInitTask(event.getServletContext(), task);
+      ServletContext ctx = event.getServletContext();
+      try
+      {
+         EnvSpecific.initThreadEnv(ctx);
+         RootContainer.getInstance().addInitTask(event.getServletContext(), task);
+      }
+      finally
+      {
+         EnvSpecific.cleanupThreadEnv(ctx);      
+      }
+      
    }
 
    /**

Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml	2009-12-21 14:39:23 UTC (rev 1103)
+++ portal/trunk/packaging/pkg/pom.xml	2009-12-21 14:57:36 UTC (rev 1104)
@@ -37,7 +37,7 @@
          <groupId>org.gatein.tools</groupId>
          <artifactId>packager</artifactId>
          <type>zip</type>
-         <version>1.0.0-Beta04</version>
+         <version>1.0.0-Beta05</version>
       </dependency>
 
       <dependency>
@@ -335,5 +335,208 @@
             </plugins>
          </build>
       </profile>
+      <profile>
+         <id>pkg-tomcat-tests</id>
+         <build>
+            <finalName>GateIn-${project.version}</finalName>
+            <plugins>
+               <!-- Ensure your environment is correctly setup -->
+               <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-enforcer-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>tomcat-check-environment-ready</id>
+                        <goals>
+                           <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                           <rules>
+                              <requireProperty>
+                                 <property>exo.projects.directory.dependencies</property>
+                                 <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+                              </requireProperty>
+                              <requireProperty>
+                                 <property>exo.projects.app.tomcat.version</property>
+                                 <message>"You must define the property exo.projects.app.tomcat.version to give the name of the directory where is stored tomcat"</message>
+                              </requireProperty>
+                              <requireFilesExist>
+                                 <files>
+                                    <file>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}/</file>
+                                 </files>
+                                 <message>"The following Tomcat directory doesn't exist : ${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
+                              </requireFilesExist>
+                           </rules>
+                           <fail>true</fail>
+                        </configuration>
+                     </execution>
+                  </executions>
+               </plugin>
+               <!-- run exo build -->
+               <plugin>
+                  <groupId>org.codehaus.mojo</groupId>
+                  <artifactId>exec-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>tomcat-packaging</id>
+                        <phase>package</phase>
+                        <configuration>
+                           <executable>java</executable>
+                           <workingDirectory>${basedir}</workingDirectory>
+                           <arguments>
+                              <argument>-Dexo.package.home=${basedir}/target/packager</argument>
+                              <argument>-Dexo.current.dir=${basedir}</argument>
+                              <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+                              <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+                              <argument>-Dexo.working.dir=${gatein.working.dir}/</argument>
+                              <!--argument>-Dexo.src.dir=NONE</argument-->
+                              <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
+                              <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
+                              <argument>-Dclean.server=${exo.projects.app.tomcat.version}</argument>
+                              <argument>-Dexo.m2.home=${maven.home}</argument>
+                              <argument>-Xshare:auto</argument>
+                              <argument>-Xms128m</argument>
+                              <argument>-Xmx512m</argument>
+                              <argument>-classpath</argument>
+                              <argument>${basedir}/target/packager/lib/js.jar</argument>
+                              <argument>org.mozilla.javascript.tools.shell.Main</argument>
+                              <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+                              <argument>exobuild</argument>
+                              <argument>--product=portal</argument>
+                              <argument>--deploy=tomcat</argument>
+                              <argument>--integration-test</argument>
+                           </arguments>
+                        </configuration>
+                        <goals>
+                           <goal>exec</goal>
+                        </goals>
+                     </execution>
+                  </executions>
+               </plugin>
+<!--
+               <plugin>
+                  <artifactId>maven-assembly-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>tomcat-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                           <goal>single</goal>
+                        </goals>
+                        <configuration>
+                           <descriptors>
+                              <descriptor>src/main/assembly/tomcat-zip.xml</descriptor>
+                           </descriptors>
+                           <attach>false</attach>
+                        </configuration>
+                     </execution>
+                  </executions>
+               </plugin>
+-->
+            </plugins>
+         </build>
+
+      </profile>
+      <profile>
+         <id>pkg-jbossas-tests</id>
+         <build>
+            <finalName>GateIn-${project.version}</finalName>
+            <plugins>
+               <!-- Ensure your environment is correctly setup -->
+               <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-enforcer-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>jbossas-check-environment-ready</id>
+                        <goals>
+                           <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                           <rules>
+                              <requireProperty>
+                                 <property>exo.projects.directory.dependencies</property>
+                                 <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+                              </requireProperty>
+                              <requireProperty>
+                                 <property>exo.projects.app.jboss.version</property>
+                                 <message>"You must define the property exo.projects.app.jboss.version to give the name of the directory where is stored JBossAS"</message>
+                              </requireProperty>
+                              <requireFilesExist>
+                                 <files>
+                                    <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
+                                 </files>
+                                 <message>"The following JBossAS directory doesn't exist : ${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
+                              </requireFilesExist>
+                           </rules>
+                           <fail>true</fail>
+                        </configuration>
+                     </execution>
+                  </executions>
+               </plugin>
+               <!-- run exo buils -->
+               <plugin>
+                  <groupId>org.codehaus.mojo</groupId>
+                  <artifactId>exec-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>jbossas-packaging</id>
+                        <phase>package</phase>
+                        <configuration>
+                           <executable>java</executable>
+                           <workingDirectory>${basedir}</workingDirectory>
+                           <arguments>
+                              <argument>-Dexo.package.home=${basedir}/target/packager</argument>
+                              <argument>-Dexo.current.dir=${basedir}</argument>
+                              <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+                              <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+                              <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
+                              <!--argument>-Dexo.src.dir=NONE</argument-->
+                              <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
+                              <argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
+                              <argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
+                              <argument>-Dexo.m2.home=${maven.home}</argument>
+                              <argument>-Xshare:auto</argument>
+                              <argument>-Xms128m</argument>
+                              <argument>-Xmx512m</argument>
+                              <argument>-classpath</argument>
+                              <argument>${basedir}/target/packager/lib/js.jar</argument>
+                              <argument>org.mozilla.javascript.tools.shell.Main</argument>
+                              <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+                              <argument>exobuild</argument>
+                              <argument>--product=portal</argument>
+                              <argument>--deploy=jbossear</argument>
+                              <argument>--integration-test</argument>
+                           </arguments>
+                        </configuration>
+                        <goals>
+                           <goal>exec</goal>
+                        </goals>
+                     </execution>
+                  </executions>
+               </plugin>
+<!--
+               <plugin>
+                  <artifactId>maven-assembly-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>jbossas-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                           <goal>single</goal>
+                        </goals>
+                        <configuration>
+                           <descriptors>
+                              <descriptor>src/main/assembly/jbossear-zip.xml</descriptor>
+                           </descriptors>
+                           <attach>false</attach>
+                        </configuration>
+                     </execution>
+                  </executions>
+               </plugin>
+-->
+            </plugins>
+         </build>
+      </profile>
    </profiles>
 </project>



More information about the gatein-commits mailing list