avaje / avaje-config

Application configuration / properties loading for JVM applications
https://avaje.io/config
Apache License 2.0
55 stars 8 forks source link

Need to filter non property command line args - IllegalArgumentException: Expecting only yaml or properties file but got [ort] #5

Closed rbygrave closed 4 years ago

rbygrave commented 4 years ago

Caused by: java.lang.IllegalArgumentException: Expecting only yaml or properties file but got [ort] at io.avaje.config.load.Loader.loadFileWithExtensionCheck(Loader.java:230) at io.avaje.config.load.Loader.loadViaPaths(Loader.java:192) at io.avaje.config.load.Loader.loadViaCommandLine(Loader.java:140) at io.avaje.config.load.Loader.loadViaCommandLineArgs(Loader.java:126) at io.avaje.config.load.Loader.loadLocalFiles(Loader.java:119) at io.avaje.config.load.Loader.load(Loader.java:83) at io.avaje.config.CoreConfiguration.load(CoreConfiguration.java:25) at io.avaje.config.Config.(Config.java:18)

This is because running a test in Eclipse runs the following command...

[org.eclipse.jdt.internal.junit.runner.RemoteTestRunner, -version, 3, -port, 53186, -testLoaderClass, org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader, -loaderpluginname, org.eclipse.jdt.junit4.runtime, -test, debrepo.teamcity.ebean.server.migration.MainDbMigrationTest:testGenerateMigrationFiles]