You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2018/01/04 17:11:30 UTC

svn commit: r1820135 - in /jackrabbit/branches/2.16: ./ jackrabbit-webapp/pom.xml jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java

Author: mreutegg
Date: Thu Jan  4 17:11:30 2018
New Revision: 1820135

URL: http://svn.apache.org/viewvc?rev=1820135&view=rev
Log:
JCR-4242: Build failure: unapproved license

Merged revision 1820133 from trunk

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

Propchange: jackrabbit/branches/2.16/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan  4 17:11:30 2018
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1820119
+/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1820119,1820133

Modified: jackrabbit/branches/2.16/jackrabbit-webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-webapp/pom.xml?rev=1820135&r1=1820134&r2=1820135&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-webapp/pom.xml (original)
+++ jackrabbit/branches/2.16/jackrabbit-webapp/pom.xml Thu Jan  4 17:11:30 2018
@@ -217,9 +217,12 @@
         <plugin>
           <artifactId>maven-failsafe-plugin</artifactId>
           <configuration>
-            <systemPropertyVariables>
-              <derby.stream.error.file>target/derby.log</derby.stream.error.file>
-            </systemPropertyVariables>
+            <systemProperties>
+              <property>
+                <name>derby.stream.error.file</name>
+                <value>target/derby.log</value>
+              </property>
+            </systemProperties>
             <excludes>
                 <exclude>**/BackwardsCompatibilityIT.java</exclude> <!-- JCR-3640 -->
             </excludes>

Modified: jackrabbit/branches/2.16/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java?rev=1820135&r1=1820134&r2=1820135&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java (original)
+++ jackrabbit/branches/2.16/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java Thu Jan  4 17:11:30 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;
 
@@ -31,6 +34,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 {
 
@@ -53,11 +57,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);
@@ -108,6 +111,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>jackrabbit/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.closeAllWindows();