[gatein-commits] gatein SVN: r4979 - in epp/portal/branches/EPP_5_1_Branch/starter: jar and 9 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 9 05:07:06 EST 2010


Author: thomas.heute at jboss.com
Date: 2010-11-09 05:07:06 -0500 (Tue, 09 Nov 2010)
New Revision: 4979

Added:
   epp/portal/branches/EPP_5_1_Branch/starter/jar/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/pom.xml
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/starter/
   epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/starter/VersionDisplayer.java
Modified:
   epp/portal/branches/EPP_5_1_Branch/starter/pom.xml
   epp/portal/branches/EPP_5_1_Branch/starter/war/pom.xml
   epp/portal/branches/EPP_5_1_Branch/starter/war/src/main/webapp/WEB-INF/web.xml
Log:
JBEPP-521: Include EPP version in log


Added: epp/portal/branches/EPP_5_1_Branch/starter/jar/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/starter/jar/pom.xml	                        (rev 0)
+++ epp/portal/branches/EPP_5_1_Branch/starter/jar/pom.xml	2010-11-09 10:07:06 UTC (rev 4979)
@@ -0,0 +1,51 @@
+<!--
+
+    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.
+
+-->
+
+<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.exoplatform.portal</groupId>
+    <artifactId>exo.portal.parent</artifactId>
+    <version>5.1.0-epp-ER04-SNAPSHOT</version>
+  </parent> 
+	
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>exo.portal.starter.jar</artifactId>
+  <packaging>jar</packaging>
+  <name>GateIn Portal Starter Jar</name>
+  <url>http://www.gatein.org</url>
+  <description>GateIn Portal Starter Jar</description>
+  
+  <build>
+    <finalName>starter</finalName>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gatein.common</groupId>
+      <artifactId>common-logging</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/starter/VersionDisplayer.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/starter/VersionDisplayer.java	                        (rev 0)
+++ epp/portal/branches/EPP_5_1_Branch/starter/jar/src/main/java/org/gatein/portal/starter/VersionDisplayer.java	2010-11-09 10:07:06 UTC (rev 4979)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.portal.starter;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+/**
+ * To display in the log the used version of EPP on startup
+ * @author <a href="theute at redhat.com">Thomas Heute</a>
+ * @version 1.0
+ */
+public class VersionDisplayer implements ServletContextListener
+{
+	private Logger logger = LoggerFactory.getLogger(VersionDisplayer.class);
+
+	public void contextDestroyed(ServletContextEvent arg0) {
+		
+	}
+
+	public void contextInitialized(ServletContextEvent arg0) {
+		String eppVersion;
+		try {
+			eppVersion = this.getClass().getPackage().getImplementationVersion();
+		} catch (Exception e) {
+			eppVersion = "Version not found";
+			e.printStackTrace();
+		}
+		logger.info("JBoss Enterprise Portal Platform [" + eppVersion + "]");
+	}
+
+}

Modified: epp/portal/branches/EPP_5_1_Branch/starter/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/starter/pom.xml	2010-11-09 08:42:24 UTC (rev 4978)
+++ epp/portal/branches/EPP_5_1_Branch/starter/pom.xml	2010-11-09 10:07:06 UTC (rev 4979)
@@ -33,6 +33,7 @@
   <description>GateIn Portal Starter Root Pom</description>
 
   <modules>
+	<module>jar</module>
 	<module>war</module>
 	<module>ear</module>
   </modules>

Modified: epp/portal/branches/EPP_5_1_Branch/starter/war/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/starter/war/pom.xml	2010-11-09 08:42:24 UTC (rev 4978)
+++ epp/portal/branches/EPP_5_1_Branch/starter/war/pom.xml	2010-11-09 10:07:06 UTC (rev 4979)
@@ -36,4 +36,21 @@
   <build>
     <finalName>starter</finalName>
   </build>
+  <dependencies>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gatein.common</groupId>
+      <artifactId>common-logging</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.starter.jar</artifactId>
+      <version>5.1.0-epp-ER04-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
 </project>

Modified: epp/portal/branches/EPP_5_1_Branch/starter/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/starter/war/src/main/webapp/WEB-INF/web.xml	2010-11-09 08:42:24 UTC (rev 4978)
+++ epp/portal/branches/EPP_5_1_Branch/starter/war/src/main/webapp/WEB-INF/web.xml	2010-11-09 10:07:06 UTC (rev 4979)
@@ -31,5 +31,8 @@
 		<listener-class>org.exoplatform.container.web.PortalContainerCreator</listener-class> 
 	</listener>
 
+	<listener>
+		<listener-class>org.gatein.portal.starter.VersionDisplayer</listener-class> 
+	</listener>
 </web-app>
 



More information about the gatein-commits mailing list