You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2014/06/02 18:17:56 UTC

[1/2] git commit: Code fixes to get all test cases to work on Tomee. 1) In TestConfigFactory.java: set classloader to avoid runtime error 2) In Tomcat5FileSystemInstaller.java: added trailing slash to context name to avoid tomcat warning during bringup

Repository: portals-pluto
Updated Branches:
  refs/heads/Tomee160 [created] 8d848588e


Code fixes to get all test cases to work on Tomee.
1) In TestConfigFactory.java: set classloader to avoid runtime error
2) In Tomcat5FileSystemInstaller.java: added trailing slash to context name
to avoid tomcat warning during bringup


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/c5686ad7
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/c5686ad7
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/c5686ad7

Branch: refs/heads/Tomee160
Commit: c5686ad77bb2c7701d7867dfca2d31cac31fdda2
Parents: dd1e821
Author: Scott Nicklous <ms...@apache.org>
Authored: Mon Jun 2 17:41:14 2014 +0200
Committer: Scott Nicklous <ms...@apache.org>
Committed: Mon Jun 2 17:41:14 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/pluto/testsuite/TestConfigFactory.java    | 1 +
 .../util/install/file/tomcat5/Tomcat5FileSystemInstaller.java      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c5686ad7/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
----------------------------------------------------------------------
diff --git a/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java b/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
index 50312a5..08fbf0a 100644
--- a/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
+++ b/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
@@ -44,6 +44,7 @@ public class TestConfigFactory {
      */
     public TestConfigFactory() {
         digester = new Digester();
+        digester.setClassLoader(Thread.currentThread().getContextClassLoader());
         digester.addObjectCreate("testportlet-config", ArrayList.class);
 
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c5686ad7/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
----------------------------------------------------------------------
diff --git a/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java b/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
index 9345466..968167b 100644
--- a/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
+++ b/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
@@ -135,7 +135,7 @@ public class Tomcat5FileSystemInstaller extends FileSystemInstaller {
     private String getConfigContents(String war, String contextPath) {
         StringBuffer contents = new StringBuffer();
         contents.append("<Context ")
-                .append("path=\"").append(contextPath).append("\" ")
+                .append("path=\"/").append(contextPath).append("\" ")
                 .append("docBase=\"").append(war).append("\" ")
                 .append("crossContext=\"true\">").append("</Context>");
        return contents.toString();


[2/2] git commit: Added profile to build Pluto appropriately for deployment on Tomee 1.6.0. Scope of certain dependencies is "compile" for deployment on tomcat, but "provided" for deployment on tomee.

Posted by ms...@apache.org.
Added profile to build Pluto appropriately for deployment on Tomee 1.6.0.
Scope of certain dependencies is "compile" for deployment on tomcat,
but "provided" for deployment on tomee.

Build for Tomee:
mvn clean install -Dtomee

Deploy to Tomee:
mvn pluto2:install -DinstallDir=<your apache-tomee-plus-1.6.0 dir>


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/8d848588
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/8d848588
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/8d848588

Branch: refs/heads/Tomee160
Commit: 8d848588eec8c2ce86bad69dd8392d3b7543db79
Parents: c5686ad
Author: Scott Nicklous <ms...@apache.org>
Authored: Mon Jun 2 18:14:17 2014 +0200
Committer: Scott Nicklous <ms...@apache.org>
Committed: Mon Jun 2 18:14:17 2014 +0200

----------------------------------------------------------------------
 pluto-container/pom.xml          |  6 ++---
 pluto-portal-driver-impl/pom.xml |  6 ++---
 pluto-portal-driver/pom.xml      |  4 ++--
 pluto-portal/pom.xml             |  9 +++++++-
 pluto-testsuite/pom.xml          | 18 ++++++++++-----
 pom.xml                          | 41 ++++++++++++++++++++++++++++++++++-
 6 files changed, 68 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pluto-container/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-container/pom.xml b/pluto-container/pom.xml
index 35f3298..06bcc8e 100644
--- a/pluto-container/pom.xml
+++ b/pluto-container/pom.xml
@@ -61,18 +61,18 @@
     <dependency>
       <groupId>javax.xml.bind</groupId>
       <artifactId>jaxb-api</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
 
     <dependency>
       <groupId>com.sun.xml.bind</groupId>
       <artifactId>jaxb-impl</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
     <dependency>
       <groupId>stax</groupId>
       <artifactId>stax</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
       <exclusions>
         <exclusion>
           <groupId>stax</groupId>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pluto-portal-driver-impl/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/pom.xml b/pluto-portal-driver-impl/pom.xml
index ab9baaa..d392025 100644
--- a/pluto-portal-driver-impl/pom.xml
+++ b/pluto-portal-driver-impl/pom.xml
@@ -60,7 +60,7 @@
     <dependency>
       <groupId>commons-digester</groupId>
       <artifactId>commons-digester</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
       <exclusions>
         <exclusion>
           <groupId>commons-logging</groupId>
@@ -90,13 +90,13 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
 
     <dependency>
       <groupId>taglibs</groupId>
       <artifactId>standard</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pluto-portal-driver/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/pom.xml b/pluto-portal-driver/pom.xml
index 52702cc..a4d5b43 100644
--- a/pluto-portal-driver/pom.xml
+++ b/pluto-portal-driver/pom.xml
@@ -79,12 +79,12 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
     <dependency>
       <groupId>taglibs</groupId>
       <artifactId>standard</artifactId>
-      <scope>compile</scope>
+      <scope>${dependency.scope}</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pluto-portal/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-portal/pom.xml b/pluto-portal/pom.xml
index 3d7f6de..d1205ab 100644
--- a/pluto-portal/pom.xml
+++ b/pluto-portal/pom.xml
@@ -103,12 +103,18 @@
 
     <dependency>
       <groupId>org.slf4j</groupId>
+	 	<artifactId>slf4j-api</artifactId>
+	 	<scope>${dependency.scope}</scope>
+	 </dependency>
+	 <dependency>
+	 	<groupId>org.slf4j</groupId>
       <artifactId>slf4j-jdk14</artifactId>
-      <scope>compile</scope>
+	 	<scope>${dependency.scope}</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>jcl-over-slf4j</artifactId>
+      <scope>compile</scope>
     </dependency>
 
     <dependency>
@@ -122,6 +128,7 @@
 
     <plugins>
       <plugin>
+      	<groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <configuration>
           <webResources>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pluto-testsuite/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-testsuite/pom.xml b/pluto-testsuite/pom.xml
index b78dd18..a4c557d 100644
--- a/pluto-testsuite/pom.xml
+++ b/pluto-testsuite/pom.xml
@@ -42,9 +42,14 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>commons-digester</groupId>
+            <artifactId>commons-digester</artifactId>
+            <scope>${dependency.scope}</scope>
+        </dependency>
+        <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>jstl</artifactId>
-            <scope>compile</scope>
+            <scope>${dependency.scope}</scope>
             <exclusions>
                 <exclusion>
                     <groupId>javax.servlet</groupId>
@@ -53,14 +58,14 @@
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>commons-digester</groupId>
-            <artifactId>commons-digester</artifactId>
-            <scope>compile</scope>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>${dependency.scope}</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-jdk14</artifactId>
-            <scope>compile</scope>
+            <scope>${dependency.scope}</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
@@ -70,7 +75,7 @@
         <dependency>
             <groupId>taglibs</groupId>
             <artifactId>standard</artifactId>
-            <scope>compile</scope>
+            <scope>${dependency.scope}</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -89,6 +94,7 @@
         <plugins>
             <!-- configure maven-war-plugin to use updated web.xml -->
             <plugin>
+   			  	<groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
                 <configuration>
                     <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8d848588/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 318e826..8d504df 100644
--- a/pom.xml
+++ b/pom.xml
@@ -266,7 +266,7 @@ generate mailto links. -->
     <stax.impl.version>1.2.0</stax.impl.version>
     <commons-digester.version>1.8</commons-digester.version>
     <commons-cli.version>1.0</commons-cli.version>
-    <slf4j.version>1.5.6</slf4j.version>
+    <slf4j.version>1.7.5</slf4j.version>
     <springframework.version>2.0.2</springframework.version>
     <maven.version>2.0.5</maven.version>
     <ant.version>1.6.5</ant.version>
@@ -291,6 +291,10 @@ TODO: Check if we need all of them. -->
     <ccpp-ri.version>1.0</ccpp-ri.version>
     <rdffilter.version>1.0</rdffilter.version>
     <jena.version>1.4.0</jena.version>
+
+    <!-- scope of certain dependencies is "compile" for deployment on tomcat, 
+         but "provided" for deployment on tomee. See tomee profile. -->
+    <dependency.scope>compile</dependency.scope>
   </properties>
 
   <dependencyManagement>
@@ -497,11 +501,26 @@ TODO: Check if we need all of them. -->
     <pluginManagement>
       <plugins>
         <plugin>
+          <groupId>org.apache.portals.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+          <version>${project.version}</version>
+        </plugin>
+        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
           <version>2.4</version>
         </plugin>
         <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.10</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <version>1.7</version>
+        </plugin>
+        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
@@ -553,6 +572,10 @@ TODO: Check if we need all of them. -->
       <id>all</id>
       <activation>
         <activeByDefault>true</activeByDefault>
+        <!-- profile must also be activated when building for tomee -->
+        <property>
+          <name>tomee</name>
+        </property>
       </activation>
       
       <!-- Pluto Modules ======================================================= -->
@@ -585,6 +608,22 @@ TODO: Check if we need all of them. -->
       <modules />
     </profile>
     
+    <!-- To build Pluto for deployment on tomee, activate this profile -->
+    <!-- Activate using the tomee property: mvn clean install -Dtomee -->
+    <profile>
+      <id>tomee</id>
+      <activation>
+        <property>
+          <name>tomee</name>
+        </property>
+      </activation>
+      <properties>
+         <!-- scope of certain dependencies is "compile" for deployment on tomcat, 
+              but "provided" for deployment on tomee. See tomee profile. -->
+		  <dependency.scope>provided</dependency.scope>
+      </properties>
+    </profile>
+
   </profiles>
 
 </project>