You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2018/07/04 13:17:45 UTC

svn commit: r1835055 - in /jackrabbit/oak/branches/1.8: ./ oak-examples/webapp/ oak-examples/webapp/pom.xml oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java

Author: reschke
Date: Wed Jul  4 13:17:45 2018
New Revision: 1835055

URL: http://svn.apache.org/viewvc?rev=1835055&view=rev
Log:
OAK-7257: oak-examples: update Tomcate dependency (ported to 1.8)

Modified:
    jackrabbit/oak/branches/1.8/   (props changed)
    jackrabbit/oak/branches/1.8/oak-examples/webapp/   (props changed)
    jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml
    jackrabbit/oak/branches/1.8/oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java

Propchange: jackrabbit/oak/branches/1.8/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  4 13:17:45 2018
@@ -1,3 +1,3 @@
 /jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1820660-1820661,1820729,1820734,1820859,1820861,1820878,1820888,1820947,1821027,1821130,1821140-1821141,1821178,1821237,1821240,1821249,1821258,1821325,1821358,1821361-1821362,1821370,1821375,1821393,1821477,1821487,1821516,1821617,1821663,1821665,1821668,1821681,1821847,1821975-1821983,1822121,1822201,1822207,1822527,1822723,1822808,1822850,1822934,1823135,1823163,1823169,1823172,1823655,1824196,1824198,1824253,1824255,1824896,1824962,1825065,1825362,1825381,1825442,1825448,1825466,1825470-1825471,1825475,1825523,1825525,1825619-1825621,1825651,1825654,1825992,1826079,1826090,1826096,1826237,1826338,1826516,1826532,1826551,1826560,1826638,1826640,1826730,1826932,1826957,1827472,1827486,1827977,1828439,1828529,1829527,1829534,1829546,1829569,1829854,1829864,1829987,1829998,1830019,1830160,1830171,1830197,1830748,1831157-1831158,1831163,1831374,1831560,1832258,1832376,1832379,1832535,1833308,1834610,1834648-1834649,1834823,1834857-1834858
+/jackrabbit/oak/trunk:1820660-1820661,1820729,1820734,1820859,1820861,1820878,1820888,1820947,1821027,1821130,1821140-1821141,1821178,1821237,1821240,1821249,1821258,1821325,1821358,1821361-1821362,1821370,1821375,1821393,1821477,1821487,1821516,1821617,1821663,1821665,1821668,1821681,1821847,1821975-1821983,1822121,1822201,1822207,1822527,1822723,1822808,1822850,1822934,1823135,1823163,1823169,1823172,1823655,1823669,1824196,1824198,1824253,1824255,1824896,1824962,1825065,1825362,1825381,1825442,1825448,1825466,1825470-1825471,1825475,1825523,1825525,1825561,1825619-1825621,1825651,1825654,1825992,1826079,1826090,1826096,1826237,1826338,1826516,1826532,1826551,1826560,1826638,1826640,1826730,1826932,1826957,1827472,1827486,1827977,1828439,1828529,1829527,1829534,1829546,1829569,1829854,1829864,1829987,1829998,1830019,1830160,1830171,1830197,1830748,1831157-1831158,1831163,1831374,1831560,1832258,1832376,1832379,1832535,1833308,1834610,1834648-1834649,1834823,1834857-1834858
 /jackrabbit/trunk:1345480

Propchange: jackrabbit/oak/branches/1.8/oak-examples/webapp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  4 13:17:45 2018
@@ -1,2 +1,3 @@
 /jackrabbit/branches/JCR-2272/jackrabbit-webapp:1173165-1176545
+/jackrabbit/oak/trunk/oak-examples/webapp:1823669,1825561
 /jackrabbit/sandbox/JCR-2415-lucene-3.0/jackrabbit-webapp:1060860-1064038

Modified: jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml?rev=1835055&r1=1835054&r2=1835055&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml (original)
+++ jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml Wed Jul  4 13:17:45 2018
@@ -35,7 +35,7 @@
   <description>Web application that hosts and serves a Jackrabbit Oak content repository</description>
 
   <properties>
-    <tomcat.version>7.0.40</tomcat.version>
+    <tomcat.version>7.0.84</tomcat.version>
     <skip.deployment>true</skip.deployment>
   </properties>
 

Modified: jackrabbit/oak/branches/1.8/oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java?rev=1835055&r1=1835054&r2=1835055&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java (original)
+++ jackrabbit/oak/branches/1.8/oak-examples/webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java Wed Jul  4 13:17:45 2018
@@ -16,9 +16,12 @@
  */
 package org.apache.jackrabbit.j2ee;
 
+import java.io.BufferedWriter;
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
 
 import junit.framework.TestCase;
 
@@ -34,6 +37,7 @@ import com.gargoylesoftware.htmlunit.htm
 import com.gargoylesoftware.htmlunit.html.HtmlForm;
 import com.gargoylesoftware.htmlunit.html.HtmlInput;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.google.common.io.Files;
 
 public class TomcatIT extends TestCase {
 
@@ -58,11 +62,10 @@ public class TomcatIT extends TestCase {
             }
         }
         assertNotNull(war);
+        rewriteWebXml(war);
 
         File bootstrap = new File("target", "bootstrap.properties");
         bootstrap.delete();
-        RepositoryAccessServlet.bootstrapOverride = bootstrap.getPath();
-        RepositoryStartupServlet.bootstrapOverride = bootstrap.getPath();
 
         File baseDir = new File("target", "tomcat");
         FileUtils.deleteQuietly(baseDir);
@@ -123,6 +126,23 @@ public class TomcatIT extends TestCase {
         return null;
     }
 
+    private void rewriteWebXml(File war) throws IOException {
+        File webXml = new File(war, new File("WEB-INF","web.xml").getPath());
+        assertTrue(webXml.exists());
+        List<String> lines = Files.readLines(webXml, StandardCharsets.UTF_8);
+        BufferedWriter writer = Files.newWriter(webXml, StandardCharsets.UTF_8);
+        try {
+            for (String line : lines) {
+                line = line.replace("<param-value>oak/bootstrap.properties</param-value>",
+                        "<param-value>target/bootstrap.properties</param-value>");
+                writer.write(line);
+                writer.write(System.lineSeparator());
+            }
+        } finally {
+            writer.close();
+        }
+    }
+
     protected void tearDown() throws Exception {
         client.close();