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

artifactoryPublish not uploading checksum files like gradle publish #648

Open
plofty opened this issue May 10, 2022 · 1 comment
Open

artifactoryPublish not uploading checksum files like gradle publish #648

plofty opened this issue May 10, 2022 · 1 comment
Labels
gradle bug Create a report to help us improve

Comments

@plofty
Copy link

plofty commented May 10, 2022

Describe the bug

I am currently using gradle publish to publish files to Artifactory

./gradlew --refresh-dependencies publish -i -s --no-watch-fs

Example project uploads the following files

basic-java-1.0.0-SNAPSHOT.jar
basic-java-1.0.0-SNAPSHOT.jar.sha512
basic-java-1.0.0-SNAPSHOT.module
basic-java-1.0.0-SNAPSHOT.module.sha512
basic-java-1.0.0-SNAPSHOT.pom
basic-java-1.0.0-SNAPSHOT.pom.sha512

Moving to Artifactory publish to include build properties. When I publish with artifactoryPublish the checksum files are missing.

./gradlew --refresh-dependencies artifactoryPublish -i -s --no-watch-fs

basic-java-1.0.0-SNAPSHOT.jar
basic-java-1.0.0-SNAPSHOT.module
basic-java-1.0.0-SNAPSHOT.pom

To Reproduce

publishing {
    publications {
        create<MavenPublication>("javaLib") {
            from(components["java"])
        }
    }
    repositories {
        maven {
            name = "Artifactory"
            url = uri(artifactoryUrl)
            credentials {
                username = artifactoryUsername
                password = artifactoryPassword
            }
        }
    }
}

artifactory {
    setContextUrl(uri(artifactoryContextUrl))
    publish {
        repository {
            setProperty("repoKey", artifactoryRepoName)
            setProperty("username", artifactoryUsername)
            setProperty("password", artifactoryPassword)
        }
        defaults{
            publications("javaLib")
            // Properties to be attached to the published artifacts.
            setProperties(mapOf(
                "git.branch.name" to gitBranchName,
                "git.commit.id" to gitCommit
            ))
        }
    }
}

Expected behavior

Artifactory publications should be producing the same files. Or maybe I am missing something

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • Gradle Artifactory plugin version: 4.28.1
  • Operating system: Fedora 35
  • Artifactory Version: Enterprise Plus 7.33.12 rev

Additional context
Add any other context about the problem here.

@plofty plofty added the gradle bug Create a report to help us improve label May 10, 2022
@rkrisztian
Copy link

While JFrog Artifactory automatically handles SHA-256, SHA-1, and MD5 checksums, providing SHA-512 checksums can offer enhanced security, but I am not sure if we should upload separate files as Gradle does, instead of storing the checksum as Artifactory metadata, just like with the other checksum types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

2 participants