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

Jenkins Artifactory Publish plugin is not working anymore #125

Open
VitaliyKulikov opened this issue Oct 21, 2024 · 3 comments
Open

Jenkins Artifactory Publish plugin is not working anymore #125

VitaliyKulikov opened this issue Oct 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@VitaliyKulikov
Copy link

Describe the bug

Jenkins Artifactory Publish plugin is not working anymore

build.gradle.kts

  plugins {
    `java-library`
    `maven-publish`
  }
  
  publishing {
    publications { create<MavenPublication>("mavenJava") { from(components["java"]) } }
  }

Jenkinsfile

  // artifactory
  def server = Artifactory.server 'artifactory'
  def rtGradle = Artifactory.newGradleBuild()
  
  rtGradle.resolver server: server, repo: 'openbet-repository'
  rtGradle.deployer server: server, repo: 'dbs-candidate-local'
  
  rtGradle.useWrapper = true
  rtGradle.usesPlugin = false -- have tried both (jenkins and gradle)
  
  def buildInfo = rtGradle.run tasks: 'artifactoryPublish', rootDir: env.WORKSPACE
  server.publishBuildInfo buildInfo

Current behavior

During Junkins build artifactoryPublish task is executing with the following output:

> Task :generateEffectiveLombokConfig UP-TO-DATE
> Task :extractIncludeProto UP-TO-DATE
> Task :extractProto UP-TO-DATE
> Task :generateProto UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :generateMetadataFileForMavenJavaPublication
> Task :generatePomFileForMavenJavaPublication
> Task :artifactoryPublish

> Task :extractModuleInfo
No publisher config found for project: dbs5-proto

> Task :artifactoryDeploy

Reproduction steps

Increase Gradle version from 8.7 to >= 8.8

Expected behavior

Here is expected output for prev version:

> Task :extractProto UP-TO-DATE
> Task :generateProto UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :generateMetadataFileForMavenJavaPublication
> Task :generatePomFileForMavenJavaPublication
> Task :artifactoryPublish
> Task :extractModuleInfo
[pool-1-thread-1] Deploying artifact: https://artifactory.int.openbet.com/artifactory/dbs-candidate-local/com/donbest/dbs5/dbs5-proto/1.0-SNAPSHOT/dbs5-proto-1.0-SNAPSHOT.jar
[pool-1-thread-1] Deploying artifact: https://artifactory.int.openbet.com/artifactory/dbs-candidate-local/com/donbest/dbs5/dbs5-proto/1.0-SNAPSHOT/dbs5-proto-1.0-SNAPSHOT.module
[pool-1-thread-1] Deploying artifact: https://artifactory.int.openbet.com/artifactory/dbs-candidate-local/com/donbest/dbs5/dbs5-proto/1.0-SNAPSHOT/dbs5-proto-1.0-SNAPSHOT.pom
> Task :artifactoryDeploy

Artifactory Gradle plugin version

5.2.5

Operating system type and version

Jenkins Host is Recent Ubuntu, Build Container is bellsoft/liberica-runtime-container:jdk-21-slim-musl

JFrog Artifactory version

4.0.8

Gradle version

8.8

@VitaliyKulikov VitaliyKulikov added the bug Something isn't working label Oct 21, 2024
@VitaliyKulikov
Copy link
Author

just for reference: gradle/gradle#29720

@yahavi
Copy link
Member

yahavi commented Oct 23, 2024

@VitaliyKulikov

Thank you for reporting this issue.

We were unable to reproduce it following your instructions on our projects. Could you please provide a minimal Gradle project that reproduces the issue?

@VitaliyKulikov
Copy link
Author

VitaliyKulikov commented Oct 30, 2024

@yahavi thanks for your response.

build.gradle.kts

plugins {

  `java-library`
  `maven-publish`

  id("com.jfrog.artifactory") version "latest.release"

}

group = "com.project"

java {
  toolchain {
    languageVersion.set(JavaLanguageVersion.of(23))
    vendor.set(JvmVendorSpec.BELLSOFT) // reference
  }
}

repositories {
  mavenCentral()
}

configurations { compileOnly { extendsFrom(configurations.annotationProcessor.get()) } }

publishing {
  publications { create<MavenPublication>("mavenJava") { from(components["java"]) } }
  repositories {
    maven {
      // just local verify.
      url = uri(layout.buildDirectory.dir("publish"))
    }
  }
}

src/main/java/com/project/Application.java

package com.project;

public class Application {

}

Gradle 8.10.2
JDK 23

if run $ gradle publish, we will have jar in build/libs folder.
for $ gradle extractModuleInfo --info No publisher config found for project

let me know if you need github repo for this. thanks!

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

2 participants