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

Publishing a Kotlin Multiplatform project with Jfrog Gradle ARtifactory plugin fails with missing artifactSpecs error #130

Open
ErikHellman opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ErikHellman
Copy link

Describe the bug

I have a Kotlin Multiplatform library project where we want to publish the artifact to our Jfrog Artifactory. I've followed the guidelines for configuring a Gradle project found here: https://github.com/jfrog/artifactory-gradle-plugin (the official documentation found at jfrog.com always leads to an error page).

My build.gradle.kts section for publishing looks like this:

configure<ArtifactoryPluginConvention> {
    publish {
        contextUrl = "https://url-to-my-artifactory"
        repository {
            repoKey = "key-for-my-repo"
            username = "my-username"
            password = "my-password"
        }

        defaults {
            setPublishArtifacts(true)
            setPublishIvy(false)
        }
    }
}

Current behavior

When running artifactoryPublish I get the following error:

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
A problem was found with the configuration of task ':lib:artifactoryPublish' (type 'ArtifactoryTask').
  - Type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask' property 'artifactSpecs' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'artifactSpecs'.
      2. Mark property 'artifactSpecs' as optional.
    
    For more information, please refer to https://docs.gradle.org/8.9/userguide/validation_problems.html#value_not_set in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':extractModuleInfo'.
> A problem occurred configuring root project 'mower-platform'.
   > Cannot create a new id after one has been loaded

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':lib:extractModuleInfo'.
> A problem occurred configuring project ':lib'.
   > Failed to apply plugin 'org.gradle.help-tasks'.
      > Cannot create a new id after one has been loaded

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

Reproduction steps

Create a new Kotlin Multiplatform Library and add the Jfrog Artifactory Gradle Plugin according to instructions.

Expected behavior

No response

Artifactory Gradle plugin version

5.2.5

Operating system type and version

macOS 14.6.1

JFrog Artifactory version

No response

Gradle version

8.9

@ErikHellman ErikHellman added the bug Something isn't working label Nov 22, 2024
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