pf4j / pf4j-update

Update mechanism for PF4J
Apache License 2.0
69 stars 39 forks source link

The pluginsJsonFileName is not optional for repositories read from JSON files #40

Closed hazemkmammu closed 5 years ago

hazemkmammu commented 5 years ago

I was using the repositories.json format in the README.md and skipped the pluginsJsonFileName property when defining repositories assuming 'plugins.json' will be used.

However since org.pf4j.update.UpdateManager.initRepositoriesFromJson() parses the org.pf4j.update.DefaultUpdateRepository from JSON, pluginsJsonFileName is null. The org.pf4j.update.DefaultUpdateRepository.initPlugins() throws a java.net.MalformedURLException when it tries to build the URL object for plugins.json.

I fixed this by specifying 'plugins.json' explicitly for all repositories, it would be nice if the default was used in case the JSON did not specify this. The org.pf4j.update.DefaultUpdateRepository.DefaultUpdateRepository(String, URL) does this.

decebals commented 5 years ago

Resolved by #42.