Facing several issues trying to consume a GitHub package I published

I created an SDK package today, but for some reason I cannot seem to use it…!

How the package was created

It is published to GitHub packages under these instructions. I had saved personal access token to environment variable on my machine, as well as my username, under GITHUB_TOKEN and GITHUB_ACTOR, respectively.

My build.gradle look like :

plugins {
  id 'java'
  id 'maven-publish'
  id "com.katalon.gradle-plugin" version "0.1.1"
}

group = 'com.mikewarren.katalonstudiosdk'
version = '1.0'

dependencies {
  implementation 'com.github.javafaker:javafaker:1.0.2'
}

repositories {
    mavenCentral()
}

sourceSets {
    main {
        groovy {
            srcDirs = ['Keywords', 'Libs']
            excludes = ['CustomKeywords.groovy', "Temp*.groovy"]
        }
    }
    test {
        groovy {
            srcDirs = ['Include/scripts/groovy']
        }
    }
}

publishing {
    repositories { 
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/MikeWarren2014/KatalonStudioSDK")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
                password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
            }
        }
    }
    publications {
        gpr(MavenPublication) {
            artifactId = 'katalon-studio-sdk'
            from components.java
        }
    }
}

I also, before all this, set up a GitHub action to publish the package, but it did NOT get hit when I said gradle clean publish --info:

image

When I try to use the package

Here is the package in question. I follow GitHub’s instructions and hit a brick wall…

Here’s the build.gradle for the consumer project:

plugins {
  id 'groovy'
  id "com.katalon.gradle-plugin" version "0.1.0"
}

repositories {
  maven {
      name = "GitHubPackages"
      url = uri("https://maven.pkg.github.com/MikeWarren2014/KatalonStudioSDK")
      credentials {
          username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
          password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
      }
  }
}

dependencies {
  implementation 'me.mikewarren.katalonstudiosdk:katalon-studio-sdk:1.0'
}

When I gradle clean build, it "succeeds`:

image

However, when I search the consumer project for the katalon-studio-sdk-1.0.jar or katalon-studio-sdk-1.0-all.jar, it’s nowhere!

I then remember this is a Katalon Studio project, which gives me the idea to gradle katalonCopyDependencies, only to be met with this:

I try to crawl the URL in my browser, and get prompted by GitHub for my credentials. Looks promising…

The page it returns for my doing so, is text page that simply says:

maven package "me.mikewarren.katalonstudiosdk.katalon-studio-sdk" does not exist under owner "MikeWarren2014"

What am I doing wrong here?

UPDATE: When I run gradle tasks --all | grep publish

I see:

publish - Publishes all publications produced by this project.
publishAllPublicationsToGitHubPackagesRepository - Publishes all Maven publications produced by this project to the GitHubPackages repository.
publishGprPublicationToGitHubPackagesRepository - Publishes Maven publication 'gpr' to Maven repository 'GitHubPackages'.
publishGprPublicationToMavenLocal - Publishes Maven publication 'gpr' to the local Maven repository.
publishToMavenLocal - Publishes all Maven publications produced by this project to the local Maven cache.

The package you linked to starts with com.mikewarren..., what you try to use in your consumer is starting with me.mikewarren....

That helped solve the package consumption issues!

Now the CI/CD issues (the GitHub Actions not getting triggered by gradle publishGprPublicationToGitHubPackagesRepository --info) remain…

Would that question/concern be out of the scope of this forum?

Why do you expect a task of maven-publish plugin to trigger any GHA workflow?