Getting "unable to resolve class" error message
Issue #469
invalid
Using: Java 8, version 1.25 of SnakeYAML
I’m getting the following error message after updating my gradle build file to use SnakeYAML:
Could not compile build file 'C:\…\build.gradle'.
startup failed:
build file 'C:\…\build.gradle': 66: unable to resolve class org.yaml.snakeyaml.Yaml
@ line 66, column 13.
def cfg = new org.yaml.snakeyaml.Yaml().load( new File("application.yaml").newInputStream() )
Within the “dependencies” section of the build file, I have this:
compile 'org.yaml:snakeyaml:1.25'
and there’s also the following task, that tries to instantiate the ‘Yaml’ class:
task testMe( ){
def cfg = new org.yaml.snakeyaml.Yaml().load( new File("application.yaml").newInputStream() )
doLast {
println "make "
println "profile = ${cfg.spring.profiles.active}"
assert cfg.spring.profiles.active == "local"
}
}
This is not issue for SnakeYAML