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

Bug with getPublisherConfig() #80

Open
lbleier-GSFC opened this issue Nov 7, 2023 · 2 comments
Open

Bug with getPublisherConfig() #80

lbleier-GSFC opened this issue Nov 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@lbleier-GSFC
Copy link

Describe the bug

I am not sure if this is a usage issue on my end, but when I attempt to use GradleRunner.build() I get an UnexpectedBuildError from Gradle

Current behavior

When running functional tests on my software, using GradleRunner.build(), I get the following error:

Cannot invoke "org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig.repository(org.gradle.api.Action)" because the return value of "org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention.getPublisherConfig()" is null

Reproduction steps

No response

Expected behavior

That the tests will pass

Artifactory Gradle plugin version

5.1.10

Operating system type and version

Ubuntu Linux 20.04.6

JFrog Artifactory version

No response

Gradle version

8.4

@lbleier-GSFC lbleier-GSFC added the bug Something isn't working label Nov 7, 2023
@yahavi
Copy link
Member

yahavi commented Dec 2, 2023

@lbleier-GSFC
Thanks for reporting this issue.
Could you kindly furnish additional details regarding your build script or the steps necessary to replicate the issue? Your input is valuable.

@lbleier-GSFC
Copy link
Author

lbleier-GSFC commented Dec 4, 2023

I have looked further into this, and it looks like my code is calling getPublisherConfig() right after constructing an ArtifactoryPluginConvention object. Based on the code seen here, it looks like doing so would result in a null returned, although there's no warning of this. It would seem that the only way to populate the publisherConfig object is to first call publish()

Generally speaking, I am trying to configure the plugin from within a Java class, and am not sure how to do it. The documentation in the README only covers Kotlin/Groovy configs.

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