GitLab Mirror pushed to branch trunk at cms-community / hippo-jackrabbit

Commits:
83f8c6e4 by Marcel Reutegger at 2018-01-04T17:07:23+00:00
JCR-4242: Build failure: unapproved license



git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1820133 
13f79535-47bb-0310-9956-ffa450edef68

- - - - -


2 changed files:

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


Changes:

=====================================
jackrabbit-webapp/pom.xml
=====================================
--- a/jackrabbit-webapp/pom.xml
+++ b/jackrabbit-webapp/pom.xml
@@ -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>


=====================================
jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
=====================================
--- a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
+++ b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
@@ -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.html.HtmlElement;
 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();
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-jackrabbit/commit/83f8c6e4d3ca1d43250b39f2ea33a10891fdab05

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-jackrabbit/commit/83f8c6e4d3ca1d43250b39f2ea33a10891fdab05
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to