ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [38/55] [abbrv] incubator-ignite git commit: # IGNITE-32 Fixed XML generator to generate XML that will pass maven copyrights validation.
Date Sun, 08 Feb 2015 07:55:55 GMT
# IGNITE-32 Fixed XML generator to generate XML that will pass maven copyrights validation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/62ae0d77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/62ae0d77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/62ae0d77

Branch: refs/heads/ignite-61
Commit: 62ae0d7730595763c9e4bbc3f0b1b13e799e9c4f
Parents: 7435690
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Sun Feb 8 09:26:45 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Sun Feb 8 09:26:45 2015 +0700

----------------------------------------------------------------------
 .../ignite/schema/generator/XmlGenerator.java   | 28 +++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/62ae0d77/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
index 9de6912..d4d7054 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
@@ -45,18 +45,18 @@ public class XmlGenerator {
      */
     private static void addComment(Document doc) {
         doc.appendChild(doc.createComment("\n" +
-            "    Licensed to the Apache Software Foundation (ASF) under one or more\n" +
-            "    contributor license agreements.  See the NOTICE file distributed with\n"
+
-            "    this work for additional information regarding copyright ownership.\n" +
-            "    The ASF licenses this file to You under the Apache License, Version 2.0\n"
+
-            "    (the \"License\"); you may not use this file except in compliance with\n"
+
-            "    the License.  You may obtain a copy of the License at\n\n" +
-            "        http://www.apache.org/licenses/LICENSE-2.0\n\n" +
-            "    Unless required by applicable law or agreed to in writing, software\n" +
-            "    distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
-            "    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+
-            "    See the License for the specific language governing permissions and\n" +
-            "    limitations under the License.\n"));
+            "  Licensed to the Apache Software Foundation (ASF) under one or more\n" +
+            "  contributor license agreements.  See the NOTICE file distributed with\n" +
+            "  this work for additional information regarding copyright ownership.\n" +
+            "  The ASF licenses this file to You under the Apache License, Version 2.0\n"
+
+            "  (the \"License\"); you may not use this file except in compliance with\n"
+
+            "  the License.  You may obtain a copy of the License at\n\n" +
+            "       http://www.apache.org/licenses/LICENSE-2.0\n\n" +
+            "  Unless required by applicable law or agreed to in writing, software\n" +
+            "  distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
+            "  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+
+            "  See the License for the specific language governing permissions and\n" +
+            "  limitations under the License.\n"));
 
         doc.appendChild(doc.createComment("\n    XML generated by Apache Ignite Schema Load
utility: " +
             new SimpleDateFormat("MM/dd/yyyy").format(new Date()) + "\n"));
@@ -329,9 +329,11 @@ public class XmlGenerator {
             // Custom pretty-print of generated XML.
             Files.write(out.toPath(), baos.toString()
                 .replaceAll("><", ">\n<")
+                .replaceFirst("<!--", "\n<!--")
+                .replaceFirst("-->", "-->\n")
                 .replaceAll("\" xmlns", "\"\n       xmlns")
                 .replaceAll("\" xsi", "\"\n       xsi")
-                .replaceAll(" http://www.springframework", " \n                         
 http://www.springframework")
+                .replaceAll(" http://www.springframework", "\n                          
http://www.springframework")
                 .getBytes());
         }
         catch (ParserConfigurationException | TransformerException | IOException e) {


Mime
View raw message