stephenh / dtonator

code generator for creating DTOs and mapping to domain objects
Other
14 stars 5 forks source link

Expected Location of the dtonator.yaml File #3

Closed pbtura closed 7 years ago

pbtura commented 7 years ago

Perhaps I'm just being dense, but I can not seem to figure out where this project expects to find the dtonator.yaml config. In the features example, I can see that the file is located in the src/main/java folder, but when I try that with my project I keep getting the error "org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Stream closed" when I try to run. Is there something I'm missing?

stephenh commented 7 years ago

It just loads dtonator.yaml off the classpath:

https://github.com/stephenh/dtonator/blob/master/dtonator/src/main/java/com/bizo/dtonator/Dtonator.java#L30

So, you can put it in src/main/java but some build tools only compile *.java files in src/main/java and may not copy over the non-java YAML file. You can also try src/main/resources which is a fairly conventional place to put non-Java files that you want to end up on the classpath.