You could do something similar to how springs @EnableAutoConfiguration annotation and SpringFactoriesLoader works by looking for META-INF/spring.factories
in all the jars on the classpath
See ClassLoader.getResources(path)
Gradle does something similar for plugin ids. It looks for properties files under META-INF/gradle-plugins
in all the jars on the buildscript classpath