Author: dkulp
Date: Thu Sep 14 12:31:35 2017
New Revision: 1808331

URL: http://svn.apache.org/viewvc?rev=1808331&view=rev
Log:
Move up to newer cxf, sort the included brushes to avoid page changes, for 
attachments with spaces, maintain a version of the file with the space

Modified:
    cxf/web/pom.xml
    cxf/web/src/main/java/org/apache/cxf/cwiki/Page.java
    cxf/web/src/main/java/org/apache/cxf/cwiki/SiteExporter.java

Modified: cxf/web/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/web/pom.xml?rev=1808331&r1=1808330&r2=1808331&view=diff
==============================================================================
--- cxf/web/pom.xml (original)
+++ cxf/web/pom.xml Thu Sep 14 12:31:35 2017
@@ -28,11 +28,11 @@
     <parent>
         <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-parent</artifactId>
-        <version>3.1.4</version>
+        <version>3.1.13</version>
     </parent>
 
     <properties>
-        <cxf.version>3.1.4</cxf.version>
+        <cxf.version>3.1.13</cxf.version>
         <extra.arg></extra.arg>
         <svn.arg1></svn.arg1>
         <svn.arg2></svn.arg2>
@@ -100,14 +100,6 @@
         <pluginManagement>
             <plugins>
                 <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
-                    </configuration>
-                </plugin>
-                <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>exec-maven-plugin</artifactId>
                     <version>1.2</version>
@@ -166,5 +158,11 @@
                 <svn.arg2>-commit</svn.arg2>
             </properties>
         </profile>
+        <profile>
+            <id>forceAll</id>
+            <properties>
+                <svn.arg1>-force</svn.arg1>
+            </properties>
+        </profile>
     </profiles>
 </project>

Modified: cxf/web/src/main/java/org/apache/cxf/cwiki/Page.java
URL: 
http://svn.apache.org/viewvc/cxf/web/src/main/java/org/apache/cxf/cwiki/Page.java?rev=1808331&r1=1808330&r2=1808331&view=diff
==============================================================================
--- cxf/web/src/main/java/org/apache/cxf/cwiki/Page.java (original)
+++ cxf/web/src/main/java/org/apache/cxf/cwiki/Page.java Thu Sep 14 12:31:35 
2017
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.xml.datatype.DatatypeFactory;
@@ -259,7 +260,7 @@ public class Page extends AbstractPage i
             }
 
             if (codeTypes == null) {
-                codeTypes = new CopyOnWriteArraySet<String>();
+                codeTypes = new ConcurrentSkipListSet<String>();
             }
             codeTypes.add(type);
             idx = c.indexOf("{code", idx + 1);
@@ -286,7 +287,7 @@ public class Page extends AbstractPage i
             }
 
             if (codeTypes == null) {
-                codeTypes = new CopyOnWriteArraySet<String>();
+                codeTypes = new ConcurrentSkipListSet<String>();
             }
             codeTypes.add(type);
             idx = c.indexOf("{snippet", idx + 1);
@@ -516,7 +517,7 @@ public class Page extends AbstractPage i
                         unmigrated = true;
                         //no idea what is in there, lets just turn on the code 
highlighting
                         if (page.codeTypes == null) {
-                            page.codeTypes = new CopyOnWriteArraySet<String>();
+                            page.codeTypes = new 
ConcurrentSkipListSet<String>();
                         }
                         page.codeTypes.add("java");
                         page.codeTypes.add("xml");
@@ -587,7 +588,7 @@ public class Page extends AbstractPage i
                     break;
                 case CODE: {
                     if (page.codeTypes == null) {
-                        page.codeTypes = new CopyOnWriteArraySet<String>();
+                        page.codeTypes = new ConcurrentSkipListSet<String>();
                     }
                     String lang = null;
                     for (Map.Entry<String, String> ent : params.entrySet()) {

Modified: cxf/web/src/main/java/org/apache/cxf/cwiki/SiteExporter.java
URL: 
http://svn.apache.org/viewvc/cxf/web/src/main/java/org/apache/cxf/cwiki/SiteExporter.java?rev=1808331&r1=1808330&r2=1808331&view=diff
==============================================================================
--- cxf/web/src/main/java/org/apache/cxf/cwiki/SiteExporter.java (original)
+++ cxf/web/src/main/java/org/apache/cxf/cwiki/SiteExporter.java Thu Sep 14 
12:31:35 2017
@@ -581,7 +581,6 @@ public class SiteExporter implements Run
                     callSvn("mkdir", file.getAbsolutePath());
                     file.mkdirs();
                 }
-                filename = filename.replace(' ', '-');
                 file = new File(file, filename);
                 boolean exists = file.exists();
                 FileOutputStream out = new FileOutputStream(file);
@@ -596,6 +595,24 @@ public class SiteExporter implements Run
                 } else {
                     svnCommitMessage.append("Modified: " + dirName + "/" + 
file.getName() + "\n");
                 }
+                if (filename.indexOf(' ') != -1) {
+                    filename = filename.replace(' ', '-');
+                    file = new File(outputDir, dirName);
+                    File f2 = new File(file, filename);
+                    exists = f2.exists();
+                    out = new FileOutputStream(f2);
+                    url = new URL(durl);
+                    ins = url.openStream();
+                    IOUtils.copy(ins, out);
+                    out.close();
+                    ins.close();
+                    if (!exists) {
+                        callSvn("add", f2.getAbsolutePath());
+                        svnCommitMessage.append("Added: " + dirName + "/" + 
f2.getName() + "\n");
+                    } else {
+                        svnCommitMessage.append("Modified: " + dirName + "/" + 
f2.getName() + "\n");
+                    }
+                }
             } catch (Exception e) {
                 e.printStackTrace();
             }


Reply via email to