diff --git a/docs/code-howtos/fetchers.md b/docs/code-howtos/fetchers.md index 1bfd9a0c6c5..627ca12174c 100644 --- a/docs/code-howtos/fetchers.md +++ b/docs/code-howtos/fetchers.md @@ -76,10 +76,10 @@ In `build.gradle`, these variables are filled: "springerNatureAPIKey" : System.getenv('SpringerNatureAPIKey') ``` -The `BuildInfo` class reads from that file. +The `BuildInfo` class reads from that file and the key needs to be put into the map of default api keys in `JabRefCliPreferences::getDefaultFetcherKeys` ```java -Injector.instantiateModelOrService(BuildInfo.class).springerNatureAPIKey +keys.put(SpringerFetcher.FETCHER_NAME, buildInfo.springerNatureAPIKey); ``` When executing `./gradlew run`, gradle executes `processResources` and populates `build/build.properties` accordingly. However, when working directly in the IDE, Eclipse keeps reading `build.properties` from `src/main/resources`. In IntelliJ, the task `JabRef Main` is executing `./gradlew processResources` before running JabRef from the IDE to ensure the `build.properties` is properly populated.