diff --git a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java index c5af4b39..d5914dec 100644 --- a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java +++ b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java @@ -57,7 +57,18 @@ public class Main { if (url != null) { readProperties(result, url.openConnection().getInputStream()); } else { - throw new IllegalArgumentException("Couldn't find " + KOBALT_PROPERTIES); + File file = new File("src/main/resources/kobalt.properties"); + if (file.exists()) { + FileInputStream fis = null; + try { + fis = new FileInputStream(file); + readProperties(result, fis); + } finally { + if (fis != null) fis.close(); + } + } else { + throw new IllegalArgumentException("Couldn't find " + KOBALT_PROPERTIES); + } } return result; }