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

Cannot resolve artifacts after upgrading from version 4.9.7 #69

Open
robojeff opened this issue Sep 18, 2023 · 1 comment
Open

Cannot resolve artifacts after upgrading from version 4.9.7 #69

robojeff opened this issue Sep 18, 2023 · 1 comment
Labels
question Further information is requested

Comments

@robojeff
Copy link

robojeff commented Sep 18, 2023

How can we help?

I need help configuring my gradle build script. Under version 4.9.7 of the plug-in, this configuration worked:

artifactory {

    def artifactoryUser = 'redacted'
    def artifactoryPassword = 'redacted'

    contextUrl = 'https://redacted.jfrog.io/redacted'
    publish {
        repository {
            repoKey = 'redacted-snapshot'
            username = "${artifactoryUser}"
            password = "${artifactoryPassword}"
            maven = true
        }

        defaults {
            publications('mavenJava')
        }
    }
    resolve {
        repository {
            repoKey = 'redacted-release'
            username = "${artifactoryUser}"
            password = "${artifactoryPassword}"
            maven = true
        }
    }
}

After upgrading to version 5.1.6, I have tried to move the resolving functionality to the repositories closure, as directed in the upgrade instructions:

repositories {
    mavenCentral()  // primary repository for 3rd party dependencies
    mavenLocal()    // repository for local publishing via Maven
    maven {
        url "https://redacted.jfrog.io/artifactory/redacted-release/"
        credentials {
            username = "redacted"
            password = "redacted"
        }
    }
}

However, this does not work. I cannot resolve any of our artifacts. I additionally tried adding "artifactUrls" statements to the repository configuration, but these do not work either.

What am I missing here?

@robojeff robojeff added the question Further information is requested label Sep 18, 2023
@yahavi
Copy link
Member

yahavi commented Sep 19, 2023

@robojeff
Thank you for choosing to use the Artifactory Gradle plugin.

Starting from Version 5, we have discontinued support for resolution repositories. You can find more details about this change at https://github.com/jfrog/artifactory-gradle-plugin#version-5-of-the-gradle-artifactory-plugin-includes-the-following-breaking-changes-compared-to-version-4.

The plugin doesn't disrupt the artifact resolution process, so this problem shouldn't be occurring. Can you please provide more details about the specific error message you're encountering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants