MaheshBabu11 / ntfy-java

This is a java client that is used for publishing notifications using NTFY
Apache License 2.0
4 stars 2 forks source link

Can't import from GitHub Maven repository #7

Closed realpixelcode closed 5 months ago

realpixelcode commented 5 months ago

Supposedly, it should be possible to import ntfy-java directly from the GitHub Maven repo, but this does not work for me. I manually downloaded the .jar file and noticed that it only contains a META-INF folder but no .class files. That's why I assume that the repo is somehow misconfigured.

Please note that I have also asked on Stack Overflow how to fix this.

MaheshBabu11 commented 5 months ago

@realpixelcode , Let me take a look into this.

MaheshBabu11 commented 5 months ago

Hi @realpixelcode ,

I have gone through the issues that you have mentioned. Here is what I found :

  1. Unable to import from GitHub directly. This is an issue with GitHub itself you have to authenticate with GitHub before downloading a package hosted here. Refer this (https://github.com/orgs/community/discussions/26634) . I will leave an XML-encoded PAT here with read access if you need : &#103;&#104;&#112;&#95;&#48;&#72;&#71;&#106;&#113;&#57;&#77;&#108;&#73;&#120;&#120;&#118;&#101;&#99;&#85;&#70;&#113;&#79;&#80;&#115;&#111;&#76;&#102;&#109;&#74;&#56;&#114;&#108;&#78;&#105;&#49;&#80;&#86;&#53;&#110;&#50; You can add this to your settings.xml as below: `<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    github maheshbabu11 {TOKEN}

    ` With that you should be able to import the package in your project.

  2. Jar does not contain class files This issue was my bad, the folder structure has to be src/main/java/<package-name> for the package to build properly. have fixed that issue and you should be able to download the jar and get it working.

I hope with that all the issues have been resolved. Thanks Mahesh

realpixelcode commented 5 months ago

have fixed that issue and you should be able to download the jar and get it working.

Thank you very much! Now it works fine ☺️

I will leave an XML-encoded PAT here with read access if you need

That's very kind of you, thanks! I did check that I can actually use my own PAT, but maybe someone else who doesn't have a GitHub account may find that useful. :)