jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1820133 - in /jackrabbit/trunk/jackrabbit-webapp: pom.xml src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
Date Thu, 04 Jan 2018 17:07:23 GMT
Author: mreutegg
Date: Thu Jan  4 17:07:23 2018
New Revision: 1820133

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


Modified:
    jackrabbit/trunk/jackrabbit-webapp/pom.xml
    jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java

Modified: jackrabbit/trunk/jackrabbit-webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/pom.xml?rev=1820133&r1=1820132&r2=1820133&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-webapp/pom.xml Thu Jan  4 17:07:23 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/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java?rev=1820133&r1=1820132&r2=1820133&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
(original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
Thu Jan  4 17:07:23 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();
 



Mime
View raw message