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

Jitpack is not working #103

Open
APJifengc opened this issue Mar 8, 2022 · 5 comments
Open

Jitpack is not working #103

APJifengc opened this issue Mar 8, 2022 · 5 comments

Comments

@APJifengc
Copy link

When I use the jitpack dependency, it says Could not find com.github.Mezy.UhcCore:UhcCore:v1.19.4..

And if I try to access it directly, https://jitpack.io/com/github/Mezy/UhcCore/UhcCore/, it also says Tag or commit 'UhcCore' not found. Rechecking.

Can you check this? Thanks!

@0dinD
Copy link

0dinD commented Mar 9, 2022

Looks like you're using the wrong groupId, com.github.Mezy.UhcCore instead of com.github.Mezy. Try com.github.Mezy:UhcCore:v1.19.4 instead, it's accessible here: https://jitpack.io/com/github/Mezy/UhcCore/1.19.4/.

@APJifengc
Copy link
Author

@0dinD

Looks like you're using the wrong groupId, com.github.Mezy.UhcCore instead of com.github.Mezy. Try com.github.Mezy:UhcCore:v1.19.4 instead, it's accessible here: https://jitpack.io/com/github/Mezy/UhcCore/1.19.4/.

Umm.. I have tried this before. This is just a dependency that Jitpack auto generates. In the pom file it just includes the three modules, com.github.Mezy.UhcCore:UhcCore:v1.19.4, com.github.Mezy.UhcCore:Support-WorldEdit-7:v1.19.4, and com.github.Mezy.UhcCore:Support-WorldEdit-6:v1.19.4.
Sorry English is not my main language, so I might not be that clear. But this file should make it clear:

https://jitpack.io/com/github/Mezy/UhcCore/1.19.4/UhcCore-1.19.4.pom

And the Jitpack build logs reports an error. See it here. So I think it's probably not my fault.

@0dinD
Copy link

0dinD commented Mar 10, 2022

This is just a dependency that Jitpack auto generates.

Yes, the project has no specific Jitpack or maven-publish configuration, so the auto-generated artifacts are what's available.

And the Jitpack build logs reports an error.

That's because the build is currently broken on the master branch, and Mezy hasn't maintained the project since last year. I've been maintaining a PR to fix the build issues and properly support Minecraft 1.18 (#98), time will tell if Mezy returns or if I'll make a fork of this project in the future. Note that there is an artifact for 1.19.4 which was built before the build issues, so com.github.Mezy.UhcCore:UhcCore:v1.19.4 should still work. Or com.github.Mezy:UhcCore:PR98-SNAPSHOT to get the latest version of #98.

In the pom file it just includes the three modules, com.github.Mezy.UhcCore:UhcCore:v1.19.4, com.github.Mezy.UhcCore:Support-WorldEdit-7:v1.19.4, and com.github.Mezy.UhcCore:Support-WorldEdit-6:v1.19.4.

Is that not what you're looking for? The "Suppport-WorldEdit" artifacts are used internally, they're just exposed because the build is not configured properly on the master branch. If you're looking for a separate API artifact, there is none, the main UhcCore is the one to use.

There's no clear separation between what's API and not, and I haven't seen any extensive documentation other than Javadoc comments. It's something I would probably try to fix if I decide to fork this project in the future.

@0dinD
Copy link

0dinD commented Mar 11, 2022

Sorry for the misunderstanding, I wasn't aware of how Jitpack works when not configured. I've now done some testing on my own and found a number of problems.

This is just a dependency that Jitpack auto generates.

I see what you mean now, it does indeed generate that artifact and sets it to depend all the modules in the repo. And if you specifically want the artifact for the root project, UhcCore, you should depend on com.github.Mezy.UhcCore:UhcCore:v1.19.4, as you said initially.

When I try this, I get the following error:

> Could not resolve com.github.Mezy.UhcCore:UhcCore:v1.19.4.
    > Could not parse POM https://jitpack.io/com/github/Mezy/UhcCore/UhcCore/v1.19.4/UhcCore-v1.19.4.pom
        > Missing required attribute: dependency groupId

It seems to get stuck on the fact that some dependencies doesn't have a groupId, like BiomeMapping which is just a local JAR in the repo. Not sure if there's a better workaround, but I did manage to depend on my PR like this:

dependencies {
    implementation("com.github.Mezy.UhcCore:UhcCore:PR98-SNAPSHOT") {
        // These dependencies are already shaded into UhcCore
        exclude group: "com.github.Mezy.UhcCore"
        exclude group: "net.wesjd", module: "anvilgui"
        exclude group: "io.papermc", module: "paperlib"
    }
}

This works because in my PR, I moved the BiomeMapping dependency to a submodule, which you can exclude so to avoid the error. This is fine since BiomeMapping (and everything excluded above) is shaded into the main artifact you get from com.github.Mezy.UhcCore:UhcCore:PR98-SNAPSHOT.

Honestly it's a bit of a mess. Some proper configuration is needed in UhcCore in order to resolve this, but again, it's not being actively maintained right now, aside from my PR.

@0dinD
Copy link

0dinD commented Jun 9, 2022

@APJifengc in case you haven't seen the announcement on the Discord server, I have now taken over the UhcCore plugin development. Mezy will no longer maintain this project, the new Git repository can be found at: https://gitlab.com/uhccore/uhccore.

And you may be happy to hear that I've fixed the publishing issues! See https://gitlab.com/uhccore/uhccore#uhccore-api for the Maven repository URL and the Maven coordinates of the plugin JAR file. It should "just work" now, no workarounds required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants