Skip to content
This repository was archived by the owner on Jun 27, 2022. It is now read-only.
This repository was archived by the owner on Jun 27, 2022. It is now read-only.

The plugin declares repositories, effectively ignoring the repositories declared in the settings. #108

@sergeykad

Description

@sergeykad

The plugin declares repositories, effectively ignoring the repositories declared in the settings.

Steps to reproduce the behavior:

Declare repositories in settigs.gradle
For example the following can be used:

dependencyResolutionManagement {
    repositories {
        mavenCentral()
    }
}

Add any dependency to your project. It will compile correctly.
Add the spring-graalvm-native-plugin. The dependencies no longer can be found and the following error is displayed.

* What went wrong:
Execution failed for task ':my-module:compileJava'.
> Failed to notify dependency resolution listener.
   > Could not resolve all dependencies for configuration ':my-module:detachedConfiguration2'.
     The project declares repositories, effectively ignoring the repositories you have declared in the settings.
     You can figure out how project repositories are declared by configuring your build to fail on project repositories.
     See https://docs.gradle.org/7.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
      > Could not find com.datastax.oss:java-driver-bom:4.11.3.
        Searched in the following locations:
          - https://repo.spring.io/release/com/datastax/oss/java-driver-bom/4.11.3/java-driver-bom-4.11.3.pom
        If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.

Expected behavior

The plugin does not override declared Maven repositories.

Desktop (please complete the following information):

  • OS: Ubuntu 21.04
  • Plugin version 1.4.10

Additional context

Duplicating repositories configuration inside the Gradle module with the plugin allows the build to pass, but it is more of a workaround.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions