Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jf gradle error in bom resolution since 2.46.3 #2265

Open
gregoryboue opened this issue Oct 17, 2023 · 1 comment
Open

jf gradle error in bom resolution since 2.46.3 #2265

gregoryboue opened this issue Oct 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@gregoryboue
Copy link

Describe the bug

Sinceand the
Since the release of CLI version 2.46.3 and the use of the artifactory-gradle-plugin 5+, errors have appeared in dependency resolution for a project that has BOM dependencies and has declared a flatdir repository in its build.gradle.

Current behavior

With a project with the following minimalist build.gradle :

plugins {
    id 'org.springframework.boot' version '2.6.1'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

sourceCompatibility = '11'

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencyManagement {
    imports {
        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2021.0.0'
        mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.1'
    }
}

If i run jf gradle clean assemble --info then the following error happens :

* What went wrong:
Execution failed for task ':bootJarMainClassName'.
> Could not resolve all dependencies for configuration ':detachedConfiguration1'.
  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.2/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
   > Could not find org.springframework.cloud:spring-cloud-dependencies:2021.0.0.
     Searched in the following locations:
       - file:/home/greg/git/gradle_tu/libs/spring-cloud-dependencies-2021.0.0.pom
       - file:/home/greg/git/gradle_tu/libs/spring-cloud-dependencies.pom
     Required by:
         project :
   > Could not find org.springframework.boot:spring-boot-dependencies:2.6.1.
     Searched in the following locations:
       - file:/home/greg/git/gradle_tu/libs/spring-boot-dependencies-2.6.1.pom
       - file:/home/greg/git/gradle_tu/libs/spring-boot-dependencies.pom
     Required by:
         project :

BOM dependencies are not retrieved from artifactory but only searched in the flatdir repository

Reproduction steps

  • Copy the following in build.gradle file :
plugins {
    id 'org.springframework.boot' version '2.6.1'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

sourceCompatibility = '11'

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencyManagement {
    imports {
        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2021.0.0'
        mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.1'
    }
}
  • With JFROG CLI 2.46.3+
  • Use gradle wrapper 7.2 and java 11/17
  • Run jf gradle-config to resolve dependency from artifactory (proxy to maven-central required)
  • run jf gradle clean assemble

Then the error will appears.

Then try the same with JFROG CLI 2.46.2 and the bom are well fetched from artifactory

Expected behavior

The expected behaviour is that the BOM as well fetched from remote as before 2.46.3

JFrog CLI version

2.46.3+

Operating system type and version

Ubuntu

JFrog Artifactory version

7.55.10

JFrog Xray version

3.79.11

@gregoryboue gregoryboue added the bug Something isn't working label Oct 17, 2023
@gregoryboue
Copy link
Author

Hi, any news about this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant