Skip to content

Commit

Permalink
Add support for generation of multi-line YAML resources
Browse files Browse the repository at this point in the history
This PR upgrade  com.fasterxml.jackson.dataformat:jackson-dataformat-yaml to version 2.8.4 which contains the bugfix FasterXML/jackson-dataformat-yaml#78 for not unquoting strings which contain boolean values.

When 2.9 is out then this should be taken along with the then new feature LITERAL_BLOCK_STYLE (instead of MINIMIZE_QUOTES). See FasterXML/jackson-dataformat-yaml#76 for details.
  • Loading branch information
rhuss committed Oct 28, 2016
1 parent bbd3c3d commit d31a340
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<artifactId>kubernetes-api</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>

<dependency>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

import java.io.File;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;

/**
* Type of resources supported
Expand All @@ -39,7 +41,8 @@ public ObjectMapper getObjectMapper() {
yaml("yml","yml") {
@Override
public ObjectMapper getObjectMapper() {
return new ObjectMapper(new YAMLFactory());
return new ObjectMapper(new YAMLFactory()
.configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true));
}
};

Expand Down
13 changes: 13 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,20 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-api</artifactId>
<version>${version.fabric8}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.8.4</version>
</dependency>

<dependency>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-project-utils</artifactId>
Expand Down

0 comments on commit d31a340

Please sign in to comment.