@Test public void readMinimal() throws ConfigurationException, UnsupportedEncodingException, IOException { try (Reader in = new InputStreamReader(getClass().getResourceAsStream("/srcdeps-minimal.yaml"), "utf-8")) { Configuration actual = new YamlConfigurationReader() .read(in) .accept(new DefaultsAndInheritanceVisitor()) .build(); Configuration expected = Configuration.builder() .sourcesDirectory(Paths.get("/home/me/.m2/srcdeps")) .repository( ScmRepository.builder() .id("srcdepsTestArtifact") .include("org.l2x6.maven.srcdeps.itest") .url("git:https: ) .accept(new DefaultsAndInheritanceVisitor()) .build(); Assert.assertEquals(expected, actual); } }
@Override public Configuration.Builder read(Reader in) throws ConfigurationException { Yaml yaml = new Yaml(new SrcdepsConstructor()); Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class); return builder; }
YamlConfigurationReader implements ConfigurationReader { @Override public Configuration.Builder read(Reader in) throws ConfigurationException { Yaml yaml = new Yaml(new SrcdepsConstructor()); Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class); return builder; } }
YamlConfigurationReader implements ConfigurationReader { @Override public Configuration.Builder read(Reader in) throws ConfigurationException { Yaml yaml = new Yaml(new SrcdepsConstructor()); Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class); return builder; }  }
YamlConfigurationReader implements ConfigurationReader { @Override public Configuration.Builder read(Reader in) throws ConfigurationException { Yaml yaml = new Yaml(new SrcdepsConstructor()); Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class); return builder; }  @Override Configuration.Builder read(Reader in); }
YamlConfigurationReader implements ConfigurationReader { @Override public Configuration.Builder read(Reader in) throws ConfigurationException { Yaml yaml = new Yaml(new SrcdepsConstructor()); Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class); return builder; }  @Override Configuration.Builder read(Reader in);  }