Closed sergeykad closed 1 year ago
If you're using FAIL_ON_PROJECT_REPOS
you need to configure the repository yourself (as there's no way for the plugin to do this for you), please see https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration for the instructions
My issue seems to be a bit different according to the Gradle error message. I do have centralized repositories declaration, but I do not set RepositoriesMode
and it uses the default value.
What I think is happening is that the repository configured by the plugin overrides all repositories from the centralized declaration and as a result, Gradle does not have any repository to download Java artifacts from.
In any case, the same solution works.
Yeah that's the PREFER_PROJECT
functionality, with that it'll use the centralized settings unless you have project configuration and plugins like this will effectively override the repositories.
But if you do have centralized repositories I highly recommend using FAIL_ON_PROJECT_REPOS
, it will highlight these issues in the more expected way
The
com.github.node-gradle.node
plugin overrides configured repositories which makes downloading Java artifacts fail. For example, the following configuration returns an error.