Skip to content
Commits on Source (10)
......@@ -3,7 +3,7 @@
## Overview ##
[YAML](http://yaml.org) is a data serialization format designed for human readability and interaction with scripting languages.
SnakeYAML is a YAML 1.1 processor for the Java Virtual Machine version 6.
SnakeYAML is a YAML 1.1 processor for the Java Virtual Machine version 7.
For YAML 1.2 (which is a superset of JSON) you may have a look at [SnakeYAML Engine](https://bitbucket.org/asomov/snakeyaml-engine)
## SnakeYAML features ##
......@@ -23,4 +23,4 @@ For YAML 1.2 (which is a superset of JSON) you may have a look at [SnakeYAML Eng
* If you find a bug in SnakeYAML, please [file a bug report](https://bitbucket.org/asomov/snakeyaml/issues?status=new&status=open).
* You may discuss SnakeYAML at
[the mailing list](http://groups.google.com/group/snakeyaml-core).
* Feel free to join the [YAML-dev Telegram group](https://t.me/joinchat/A6K7rhBzRfHcP-0XnTxnhA)
\ No newline at end of file
* Telegram group is removed because of the spam
......@@ -11,4 +11,5 @@ pipelines:
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -V -B -Pwith-java8-tests clean install
#- mvn -V -B clean verify
- mvn -V -B -Pwith-java8-tests clean verify
snakeyaml (1.25+ds-1) unstable; urgency=medium
[ Mechtilde ]
* [34a0dea] debian/salsa-ci.yml was added when the repo was cloned
* [93286b3] New upstream version 1.25+ds
* [4e86887] Use debhelper-compat for choosing compat level
* [7189713] Updated Uploader in debian/control
* [0291e6d] Added me to debian/copyright
* [76e67c7] removed debian/source/lintian-overrides - no longer necessary
* [90f0806] expanded debian/watch to detect repacked version
* [468455d] Added new dependencies to debian/control and debian/maven.rules
-- Mechtilde Stehmann <mechtilde@debian.org> Sun, 15 Sep 2019 12:33:38 +0200
snakeyaml (1.23-1) unstable; urgency=medium
* Team upload.
......
......@@ -3,19 +3,24 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders:
Stefan Denker <Stefan+Debian@dn-kr.de>,
Hilko Bengen <bengen@debian.org>
Stefan Denker <Stefan+Debian@dn-kr.de>
, Hilko Bengen <bengen@debian.org>
, Mechtilde Stehmann <mechtilde@debian.org>
Build-Depends:
debhelper (>= 11),
default-jdk,
junit4,
libjoda-time-java,
libmaven-bundle-plugin-java,
libmaven-javadoc-plugin-java,
libspring-context-java,
maven-debian-helper (>= 1.6.5),
velocity
Standards-Version: 4.2.1
debhelper-compat (= 12)
, default-jdk
, junit4
, libcommons-lang3-java
, libcommons-io-java
, libjoda-time-java
, libmaven-bundle-plugin-java
, libmaven-javadoc-plugin-java
, libspring-beans-java
, libspring-context-java
, libspring-core-java
, maven-debian-helper (>= 1.6.5)
, velocity
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/snakeyaml.git
Vcs-Browser: https://salsa.debian.org/java-team/snakeyaml
Homepage: https://bitbucket.org/asomov/snakeyaml
......
......@@ -19,6 +19,7 @@ License: Apache-2.0
Files: debian/*
Copyright: 2013, Stefan denker <Stefan+Debian@dn-kr.de>
2019, Mechtilde Stehmann <mechtilde@debian.org>
License: Apache-2.0
License: Apache-2.0
......
org.yaml snakeyaml bundle s/1\..*/1.x/ * *
#[groupID] [artifactID] [type] [version] [classifier] [scope]
org.yaml snakeyaml bundle s/1.25/1.25+ds/ * *
junit junit * s/.*/4.x/ * *
org.apache.felix maven-bundle-plugin * * * *
org.springframework s/spring-context-support/spring-context/ * s/.*/3.x/ * *
org.springframework s/spring-context-support/spring-context/ * s/.*/4.3.22.RELEASE/ * test
org.apache.commons commons-lang3 * s/.*/3.8/ * test
commons-io commons-io *s/2.5/2.x/ * test
org.springframework spring-core * s/.*/4.3.22.RELEASE/ * test
org.springframework spring-beans * s/.*/4.3.22.RELEASE/ * test
org.apache.velocity velocity * s/.*/1.7/ * test
joda-time joda-time * s/.*/2.10.3/ * test
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
version=4
opts=repack,compression=xz,uversionmangle=s/(\d)[\.\-]?((?:rc|RC|pre)(?:\.|-)?\d+(?:-\d+)?)$/$1~$2/,
https://bitbucket.org/asomov/snakeyaml/downloads?tab=tags .*/snakeyaml-(\d\S+)\.tar\.gz
opts="repack,compression=xz,dversionmangle=s/\+ds$//,\
uversionmangle=s/(\d)[\.\-]?((?:rc|RC|pre)(?:\.|-)?\d+(?:-\d+)?)$/$1~$2/ "\
https://bitbucket.org/asomov/snakeyaml/downloads?tab=tags \
.*/snakeyaml-(\d\S+)\.tar\.gz
#!/usr/bin/env bash
./docker-run.sh 11-slim -Pwith-java11-tests
./docker-run.sh 11-slim -Pwith-java11-tests $@
#!/usr/bin/env bash
./docker-run.sh 6
#!/usr/bin/env bash
./docker-run.sh 7
./docker-run.sh 7 $@
#!/usr/bin/env bash
./docker-run.sh 8 -Pwith-java8-tests
./docker-run.sh 8 -Pwith-java8-tests $@
......@@ -6,5 +6,5 @@ docker run --rm -it \
-e "HOME=/my-home" \
-w /work \
maven:3.5.4-jdk-$1 \
mvn -Dmaven.repo.local=/my-home/.m2/repository clean test $2
mvn -Dmaven.repo.local=/my-home/.m2/repository clean test ${@:2}
......@@ -3,21 +3,21 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
<version>1.25</version>
<packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.scm.id>bitbucket</project.scm.id>
<release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repo.url>
<snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots/</snapshot.repo.url>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>7</maven.compiler.source>
<maven.compiler.target>7</maven.compiler.target>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<spring.version>3.2.17.RELEASE</spring.version>
<maven-bundle-plugin.version>3.5.0</maven-bundle-plugin.version>
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
<maven-site-plugin.version>3.6</maven-site-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
<maven-surefire-plugin.version>3.0.0-M1</maven-surefire-plugin.version>
<jdk9-illegal-access-level>deny</jdk9-illegal-access-level>
</properties>
<name>SnakeYAML</name>
......@@ -28,7 +28,7 @@
<system>Bitbucket</system>
<url>https://bitbucket.org/asomov/snakeyaml/issues</url>
</issueManagement>
<!--ciManagement>
<!-- ciManagement>
<system>jenkins</system>
<url>https://snakeyaml.ci.cloudbees.com/job/SnakeYAML/</url>
</ciManagement-->
......@@ -42,7 +42,7 @@
<connection>scm:hg:http://bitbucket.org/asomov/snakeyaml</connection>
<developerConnection>scm:hg:ssh://hg@bitbucket.org/asomov/snakeyaml</developerConnection>
<url>https://bitbucket.org/asomov/snakeyaml/src</url>
<tag>snakeyaml-1.23</tag>
<tag>snakeyaml-1.25</tag>
</scm>
<licenses>
<license>
......@@ -114,7 +114,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.6</version>
<version>2.10.1</version>
<scope>test</scope>
</dependency>
</dependencies>
......@@ -143,7 +143,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.0.0</version>
<configuration>
<excludePackageNames>org.yaml.snakeyaml.external.*</excludePackageNames>
</configuration>
......@@ -156,7 +156,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
......@@ -166,12 +166,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>3.7.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -184,7 +184,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>enforce-maven</id>
......@@ -194,7 +194,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>3.0.5</version>
<version>3.3.0</version>
</requireMavenVersion>
</rules>
</configuration>
......@@ -319,6 +319,7 @@
!org.yaml.snakeyaml.external*,
org.yaml.snakeyaml.*;version=${project.version}
</Export-Package>
<Automatic-Module-Name>org.yaml.snakeyaml</Automatic-Module-Name>
</instructions>
</configuration>
</plugin>
......@@ -348,7 +349,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
......@@ -525,7 +526,6 @@
</goals>
<configuration>
<sources>
<source>${basedir}/src/test/java7/</source>
<source>${basedir}/src/test/java8/</source>
</sources>
</configuration>
......@@ -572,7 +572,6 @@
</goals>
<configuration>
<sources>
<source>${basedir}/src/test/java7/</source>
<source>${basedir}/src/test/java8/</source>
<source>${basedir}/src/test/java11/</source>
</sources>
......@@ -617,12 +616,12 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
<version>3.0.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.7</version>
<version>3.9.0</version>
</plugin>
</plugins>
</build>
......@@ -768,10 +767,10 @@
<mkdir dir="${android.test.classes}" />
<!-- compile patched sources -->
<javac srcdir="${android.src.main}" destdir="${android.classes}" classpath="${android.classes}" encoding="${project.build.sourceEncoding}" target="1.6" source="1.6" debug="true" includeantruntime="false" fork="true" />
<javac srcdir="${android.src.main}" destdir="${android.classes}" classpath="${android.classes}" encoding="${project.build.sourceEncoding}" target="1.7" source="1.7" debug="true" includeantruntime="true" fork="true" />
<!-- compile test classes. Exclude some - not for BeanAccess.FIELD -->
<javac srcdir="${android.src.test}:${basedir}/src/test/resources" destdir="${android.test.classes}" classpath="${android.classes}:${android.test.classes}:${junit:junit:jar}:${org.springframework:spring-core:jar}:${org.springframework:spring-beans:jar}:${org.springframework:spring-context:jar}:${org.apache.velocity:velocity:jar}:${joda-time:joda-time:jar}:${commons-io:commons-io:jar}:${commons-lang:commons-lang:jar}:${org.hamcrest:hamcrest-core:jar}" encoding="${project.build.sourceEncoding}" target="1.6" source="1.6" debug="true" includeantruntime="false" fork="true">
<javac srcdir="${android.src.test}:${basedir}/src/test/resources" destdir="${android.test.classes}" classpath="${android.classes}:${android.test.classes}:${junit:junit:jar}:${org.springframework:spring-core:jar}:${org.springframework:spring-beans:jar}:${org.springframework:spring-context:jar}:${org.apache.velocity:velocity:jar}:${joda-time:joda-time:jar}:${commons-io:commons-io:jar}:${commons-lang:commons-lang:jar}:${org.hamcrest:hamcrest-core:jar}" encoding="${project.build.sourceEncoding}" target="1.7" source="1.7" debug="true" includeantruntime="true" fork="true">
<exclude name="org/yaml/snakeyaml/introspector/MethodPropertyTest.java" />
<exclude name="org/yaml/snakeyaml/representer/FilterPropertyToDumpTest.java" />
......@@ -797,8 +796,7 @@
</goals>
<configuration>
<classesDirectory>${android.classes}</classesDirectory>
<reportsDirectory>${project.build.directory}/android/surefire-reports
</reportsDirectory>
<reportsDirectory>${project.build.directory}/android/surefire-reports</reportsDirectory>
<testClassesDirectory>${android.test.classes}</testClassesDirectory>
<!--
We ignore test failures for android build at the moment.
......
......@@ -5,6 +5,55 @@
<title>YAML 1.1 parser and emitter</title>
</properties>
<body>
<release version="1.25" date="in Mercurial" description="Maintenance">
<action dev="asomov" type="update">
Deprecate setting tags in TypeDescription (2019-06-23)
</action>
<action dev="asomov" type="fix" issue="449">
Add test for issue 449 (2019-06-19)
</action>
<action dev="asomov" type="add" issue="441">
Restore the way to get anchor for a Node (2019-04-13)
</action>
<action dev="asomov" type="fix" issue="437">
Introduce setting to keep !!str tag for String even when it contains non-printable chars (2019-03-24)
</action>
<action dev="asomov" type="update">
Update plugin versions (2019-03-04)
</action>
</release>
<release version="1.24" date="2019-02-28" description="Maintenance">
<action dev="asomov" type="update">
Refactor BaseConstructor: Factored out postponed mapping logic so subclasses can effectively
override constructMapping2ndStep() and delegate to the postponed mapping logic.
This is backported from SnakeYAML engine (2019-01-26)
</action>
<action dev="asomov" type="fix" issue="431">
Customize simple key length when dumping (2019-01-17)
</action>
<action dev="asomov" type="fix" issue="430">
Wrap runtime exceptions into YAMLException (2019-01-14)
</action>
<action dev="asomov" type="fix">
Fix: Null tag constructor not called when parsing top-level null value (2019-01-13)
(issue reported for snakeyaml-engine)
</action>
<action dev="asomov" type="fix" issue="429">
Provide "Automatic-Module-Name" entry in MANIFEST (2018-12-16)
</action>
<action dev="asomov" type="fix" issue="426">
Fix NPE when duplicate keys are not allowed and the key is null (2018-12-02)
</action>
<action dev="asomov" type="update">
Support java.sql classes without the need to depend on java.sql module in java9+ (2018-11-06)
</action>
<action dev="asomov" type="update">
Require Java 7 (2018-11-06)
</action>
<action dev="asomov" type="fix" issue="423">
Date Serialization Fails for TimeZones on Daylight Savings Time (2018-11-06)
</action>
</release>
<release version="1.23" date="2018-08-27" description="Maintenance">
<action dev="asomov" type="fix" issue="412">
Add another getter for ScalarStyle to support backwards compatibility (2018-08-27)
......
From: Andrey Somov <public.somov@gmail.com>
To: yaml-core@lists.sourceforge.net
Subject: [ANN] SnakeYAML-1.22 final is available
Subject: [ANN] SnakeYAML-1.24 final is available
==========================
Announcing SnakeYAML-1.22
Announcing SnakeYAML-1.24
==========================
A new release of SnakeYAML is now available:
http://www.snakeyaml.org
This release delivers minor changes and bug fixes.
This is the last release to support Java 6. As of the next release Java 7 will be required.
This release delivers minor changes and bug fixes
Starting from this release minimum required Java version is 7.
The complete list of changes is here: https://bitbucket.org/asomov/snakeyaml/wiki/Changes
......@@ -21,8 +21,8 @@ Resources
SnakeYAML homepage: http://www.snakeyaml.org
SnakeYAML documentation: https://bitbucket.org/asomov/snakeyaml/wiki/Home
JAR package: http://repo2.maven.org/maven2/org/yaml/snakeyaml/1.22/snakeyaml-1.22.jar
Android: http://repo2.maven.org/maven2/org/yaml/snakeyaml/1.22/snakeyaml-1.22-android.jar
JAR package: http://repo2.maven.org/maven2/org/yaml/snakeyaml/1.24/snakeyaml-1.24.jar
Android: http://repo2.maven.org/maven2/org/yaml/snakeyaml/1.24/snakeyaml-1.24-android.jar
YAML homepage: http://yaml.org/
YAML-core mailing list: http://lists.sourceforge.net/lists/listinfo/yaml-core
......@@ -30,7 +30,7 @@ YAML-core mailing list: http://lists.sourceforge.net/lists/listinfo/yaml-core
About SnakeYAML
================
SnakeYAML is a YAML parser and emitter for Java 6.
SnakeYAML is a YAML parser and emitter for Java 7.
SnakeYAML features a complete YAML 1.1 parser.
SnakeYAML is applicable for a broad range of tasks from complex
......
......@@ -169,6 +169,17 @@ public class DumperOptions {
}
}
public enum NonPrintableStyle {
/**
* Tranform String to binary if it contains non-printable characters
*/
BINARY,
/**
* Escape non-printable characters
*/
ESCAPE
}
private ScalarStyle defaultStyle = ScalarStyle.PLAIN;
private FlowStyle defaultFlowStyle = FlowStyle.AUTO;
private boolean canonical = false;
......@@ -182,6 +193,8 @@ public class DumperOptions {
private boolean explicitStart = false;
private boolean explicitEnd = false;
private TimeZone timeZone = null;
private int maxSimpleKeyLength = 128;
private NonPrintableStyle nonPrintableStyle = NonPrintableStyle.BINARY;
private Version version = null;
private Map<String, String> tags = null;
......@@ -415,4 +428,33 @@ public class DumperOptions {
public void setAnchorGenerator(AnchorGenerator anchorGenerator) {
this.anchorGenerator = anchorGenerator;
}
public int getMaxSimpleKeyLength() {
return maxSimpleKeyLength;
}
/**
* Define max key length to use simple key (without '?')
* More info https://yaml.org/spec/1.1/#id934537
* @param maxSimpleKeyLength - the limit after which the key gets explicit key indicator '?'
*/
public void setMaxSimpleKeyLength(int maxSimpleKeyLength) {
if(maxSimpleKeyLength > 1024) {
throw new YAMLException("The simple key must not span more than 1024 stream characters. See https://yaml.org/spec/1.1/#id934537");
}
this.maxSimpleKeyLength = maxSimpleKeyLength;
}
public NonPrintableStyle getNonPrintableStyle() {
return this.nonPrintableStyle;
}
/**
* When String contains non-printable characters SnakeYAML convert it to binary data with the !!binary tag.
* Set this to ESCAPE to keep the !!str tag and escape the non-printable chars with \\x or \\u
* @param style ESCAPE to force SnakeYAML to keep !!str tag for non-printable data
*/
public void setNonPrintableStyle(NonPrintableStyle style) {
this.nonPrintableStyle = style;
}
}
......@@ -18,6 +18,7 @@ package org.yaml.snakeyaml;
public class LoaderOptions {
private boolean allowDuplicateKeys = true;
private boolean wrappedToRootException = false;
public boolean isAllowDuplicateKeys() {
return allowDuplicateKeys;
......@@ -42,4 +43,18 @@ public class LoaderOptions {
this.allowDuplicateKeys = allowDuplicateKeys;
}
public boolean isWrappedToRootException() {
return wrappedToRootException;
}
/**
* Wrap runtime exception to YAMLException during parsing or leave them as they are
*
* Default is to leave original exceptions
*
* @param wrappedToRootException - true to convert runtime exception to YAMLException
*/
public void setWrappedToRootException(boolean wrappedToRootException) {
this.wrappedToRootException = wrappedToRootException;
}
}
......@@ -100,15 +100,23 @@ public class TypeDescription {
}
/**
* Set tag to be used to load or dump the type (class).
* Set tag to be used dump the type (class).
*
* @param tag
* local or global tag
* @param tag - local or global tag
* @deprecated it will be removed because it is not used
*/
@Deprecated
public void setTag(Tag tag) {
this.tag = tag;
}
/**
* Set tag to be used to dump the type (class).
*
* @param tag - local or global tag
* @deprecated it will be removed because it is not used
*/
@Deprecated
public void setTag(String tag) {
setTag(new Tag(tag));
}
......