[jackson-dataformat-yaml] 02/04: Updated patches: Removed SnakeYAML patch, added dependencies, plugins

Hilko Bengen bengen at moszumanska.debian.org
Sun Oct 12 14:16:30 BST 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository jackson-dataformat-yaml.

commit 6851e1af7192096959fb201bb1d8f0099de702c8
Author: Hilko Bengen <bengen at debian.org>
Date:   Sun Oct 12 14:20:06 2014 +0200

    Updated patches: Removed SnakeYAML patch, added dependencies, plugins
---
 debian/control                                     |   1 +
 debian/patches/0001-Fix-bundle-build.patch         |  25 +++++
 .../0001-SnakeYAML-1.11-compatibility.patch        | 104 ---------------------
 debian/patches/0002-depend-on-junit.patch          |  25 +++++
 debian/patches/series                              |   3 +-
 5 files changed, 53 insertions(+), 105 deletions(-)

diff --git a/debian/control b/debian/control
index 816ee79..f75e46a 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Build-Depends-Indep: default-jdk-doc,
                      libjackson2-core-java-doc,
                      libmaven-javadoc-plugin-java,
                      libmaven-shade-plugin-java,
+                     libmaven-bundle-plugin-java,
                      libyaml-snake-java-doc
 Standards-Version: 3.9.4
 Vcs-Git: git://anonscm.debian.org/pkg-java/jackson-dataformat-yaml.git
diff --git a/debian/patches/0001-Fix-bundle-build.patch b/debian/patches/0001-Fix-bundle-build.patch
new file mode 100644
index 0000000..6796b68
--- /dev/null
+++ b/debian/patches/0001-Fix-bundle-build.patch
@@ -0,0 +1,25 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 12 Oct 2014 14:55:28 +0200
+Subject: Fix bundle build
+
+---
+ pom.xml | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/pom.xml b/pom.xml
+index 21c6b34..1e2a9b2 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -131,6 +131,12 @@ com.fasterxml.jackson.core.util,
+           </execution>
+         </executions>
+       </plugin>
++      <plugin>
++        <groupId>org.apache.felix</groupId>
++        <artifactId>maven-bundle-plugin</artifactId>
++        <version>2.3.5</version>
++        <extensions>true</extensions>
++      </plugin>
+     </plugins>
+   </build>
+ 
diff --git a/debian/patches/0001-SnakeYAML-1.11-compatibility.patch b/debian/patches/0001-SnakeYAML-1.11-compatibility.patch
deleted file mode 100644
index cfb9cf2..0000000
--- a/debian/patches/0001-SnakeYAML-1.11-compatibility.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From: Wolodja Wentland <babilen at gmail.com>
-Date: Thu, 26 Sep 2013 15:41:13 +0100
-Subject: SnakeYAML 1.11 compatibility
-
-This patch allows compilation against SnakeYAML versions >= 1.11 which
-introduced backwards incompatible changes.
-
-    * Use Version enum instead of Array of Integers (1428:3262575396ab)
-
-Furthermore version 1.11 fixes issue 146 [0] in SnakeYAML so that no explicit
-document start marker (i.e. "---") is written if tags are empty. This
-necessitated changes to the generation tests that codified the (buggy)
-behaviour.
-
-[0] https://code.google.com/p/snakeyaml/issues/detail?id=146
----
- .../java/com/fasterxml/jackson/dataformat/yaml/YAMLFactory.java  | 5 ++---
- .../com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java     | 2 +-
- .../fasterxml/jackson/dataformat/yaml/SimpleGenerationTest.java  | 9 ++++-----
- 3 files changed, 7 insertions(+), 9 deletions(-)
-
-diff --git a/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLFactory.java b/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLFactory.java
-index 73d2d25..1a4b621 100644
---- a/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLFactory.java
-+++ b/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLFactory.java
-@@ -56,7 +56,7 @@ public class YAMLFactory extends JsonFactory
- 
-     protected transient DumperOptions _outputOptions;
- 
--    protected Integer[] _version;
-+    protected DumperOptions.Version _version;
-     
-     /**
-      * Default constructor used to create factory instances.
-@@ -76,8 +76,7 @@ public class YAMLFactory extends JsonFactory
-         _yamlParserFeatures = DEFAULT_YAML_PARSER_FEATURE_FLAGS;
-         _yamlGeneratorFeatures = DEFAULT_YAML_GENERATOR_FEATURE_FLAGS;
-         _outputOptions = _defaultOptions();
--        DumperOptions.Version version = _outputOptions.getVersion();
--        _version = (version == null) ? null : version.getArray();
-+        _version = _outputOptions.getVersion();
-     }
- 
-     /**
-diff --git a/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java b/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java
-index 5687331..d9ea4ac 100644
---- a/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java
-+++ b/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java
-@@ -100,7 +100,7 @@ public class YAMLGenerator extends GeneratorBase
-     
-     public YAMLGenerator(IOContext ctxt, int jsonFeatures, int yamlFeatures,
-             ObjectCodec codec, Writer out,
--            DumperOptions outputOptions, Integer[] version
-+            DumperOptions outputOptions, DumperOptions.Version version
-             ) throws IOException
-     {
-         super(jsonFeatures, codec);
-diff --git a/src/test/java/com/fasterxml/jackson/dataformat/yaml/SimpleGenerationTest.java b/src/test/java/com/fasterxml/jackson/dataformat/yaml/SimpleGenerationTest.java
-index f2aa032..6750d21 100644
---- a/src/test/java/com/fasterxml/jackson/dataformat/yaml/SimpleGenerationTest.java
-+++ b/src/test/java/com/fasterxml/jackson/dataformat/yaml/SimpleGenerationTest.java
-@@ -22,7 +22,7 @@ public class SimpleGenerationTest extends ModuleTestBase
-         
-         String yaml = w.toString();
-         // should probably parse...
--        assertEquals("---\n- 3\n- \"foobar\"\n", yaml);
-+        assertEquals("- 3\n- \"foobar\"\n", yaml);
-     }
- 
-     public void testStreamingObject() throws Exception
-@@ -37,7 +37,7 @@ public class SimpleGenerationTest extends ModuleTestBase
-         gen.close();
-         
-         String yaml = w.toString();
--        assertEquals("---\nname: \"Brad\"\nage: 39\n", yaml);
-+        assertEquals("name: \"Brad\"\nage: 39\n", yaml);
-     }
-     
-     public void testBasicPOJO() throws Exception
-@@ -47,14 +47,13 @@ public class SimpleGenerationTest extends ModuleTestBase
-                 FiveMinuteUser.Gender.MALE, new byte[] { 1, 3, 13, 79 });
-         String yaml = mapper.writeValueAsString(user).trim();
-         String[] parts = yaml.split("\n");
--        assertEquals(6, parts.length);
-+        assertEquals(5, parts.length);
-         // unify ordering, need to use TreeSets
-         TreeSet<String> exp = new TreeSet<String>();
-         for (String part : parts) {
-             exp.add(part.trim());
-         }
-         Iterator<String> it = exp.iterator();
--        assertEquals("---", it.next());
-         assertEquals("firstName: \"Bob\"", it.next());
-         assertEquals("gender: \"MALE\"", it.next());
-         assertEquals("lastName: \"Dabolito\"", it.next());
-@@ -70,7 +69,7 @@ public class SimpleGenerationTest extends ModuleTestBase
-         ObjectMapper mapper = mapperForYAML();
-         mapper.writeValue(f, "Foobar");
-         assertTrue(f.canRead());
--        assertEquals(13L, f.length());
-+        assertEquals(9L, f.length());
-         f.delete();
-     }
- }
diff --git a/debian/patches/0002-depend-on-junit.patch b/debian/patches/0002-depend-on-junit.patch
new file mode 100644
index 0000000..a0c3978
--- /dev/null
+++ b/debian/patches/0002-depend-on-junit.patch
@@ -0,0 +1,25 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 12 Oct 2014 14:57:16 +0200
+Subject: depend on junit
+
+---
+ pom.xml | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/pom.xml b/pom.xml
+index 1e2a9b2..241774e 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -74,6 +74,12 @@ com.fasterxml.jackson.core.util,
+       <version>${version.jackson.core}</version>
+       <scope>test</scope>
+     </dependency>
++    <dependency>
++      <groupId>junit</groupId>
++      <artifactId>junit</artifactId>
++      <version>4.11</version>
++      <scope>test</scope>
++    </dependency>
+   </dependencies>
+ 
+   <build>
diff --git a/debian/patches/series b/debian/patches/series
index 40283dd..5bf5199 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-0001-SnakeYAML-1.11-compatibility.patch
+0001-Fix-bundle-build.patch
+0002-depend-on-junit.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-dataformat-yaml.git



More information about the pkg-java-commits mailing list