Skip to content

Commit

Permalink
Update snakeyaml dependency to version 2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Dockal <odockal@redhat.com>
  • Loading branch information
odockal authored and olkornii committed Jul 18, 2023
1 parent 05ba8bd commit c88e20b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/org.eclipse.reddeer.junit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
com.fasterxml.jackson.core.jackson-core,
com.fasterxml.jackson.core.jackson-databind,
org.json;bundle-version="1.0.0",
org.yaml.snakeyaml;bundle-version="1.14.0"
org.yaml.snakeyaml;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ClassPath: .
Expand Down
10 changes: 10 additions & 0 deletions plugins/org.eclipse.reddeer.junit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@
<artifactId>plugins</artifactId>
<version>4.7.0-SNAPSHOT</version>
</parent>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.0</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import org.eclipse.reddeer.junit.requirement.RequirementException;
import org.eclipse.reddeer.junit.requirement.configuration.RequirementConfiguration;
import org.json.JSONObject;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.constructor.Constructor;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
Expand Down Expand Up @@ -86,7 +87,7 @@ public List<RequirementConfiguration> loadConfigurations(File file) {

@SuppressWarnings("unchecked")
private String convertYamlToJson(File file) throws FileNotFoundException {
Map<String,Object> map= (Map<String, Object>) new Yaml(new SafeConstructor()).load(new FileReader(file));
Map<String,Object> map= (Map<String, Object>) new Yaml(new Constructor(new LoaderOptions())).load(new FileReader(file));
JSONObject jsonObject = new JSONObject(map);
return jsonObject.toString();
}
Expand Down
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<pomDependencies>consider</pomDependencies>
<resolver>p2</resolver>
<ignoreTychoRepositories>true</ignoreTychoRepositories>
<environments>
<environment>
<os>macosx</os>
Expand Down Expand Up @@ -210,6 +210,12 @@
<url>${eclipse-orbit-update-site}</url>
<layout>p2</layout>
</repository>
<repository>
<id>maven-central-snakeyaml</id>
<url>https://repo.maven.apache.org/maven2/org/snakeyaml/snakeyaml-engine/</url>
<layout>default</layout>
</repository>

</repositories>

<pluginRepositories>
Expand Down

0 comments on commit c88e20b

Please sign in to comment.