LightAPI
LightAPI copied to clipboard
Jitpack
Hello,
I am trying to make plugin, that uses LightAPI, and I would like to use Jitpack. Problem is, Jitpack is returning error while trying to build your repository (https://jitpack.io/com/github/Qveshn/LightAPI/3.4.2/build.log). Each release is broken (https://jitpack.io/#Qveshn/LightAPI).
My current solution is
<dependency>
<groupId>ru.beykerykt</groupId>
<artifactId>lightapi-fork</artifactId>
<version>3.4.2-fork</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/LightAPI-fork-3.4.2.jar</systemPath>
</dependency>
But I would love to use Jitpack for LightAPI (seems cleaner for me). Can you take a look what is going on?
Thanks.
Hi I am dummy in jitpack :) But I have looked into log (https://jitpack.io/com/github/Qveshn/LightAPI/3.4.2/build.log):
[ERROR] Failed to execute goal on project v1_15_R1: Could not resolve dependencies for project ru.beykerykt.lightapi.nms:v1_15_R1:jar:3.3.0: Could not find artifact org.bukkit:craftbukkit:jar:1.15-R0.1-SNAPSHOT -> [Help 1]
This means that your maven repository does not have org.bukkit:craftbukkit:jar:1.15-R0.1-SNAPSHOT Unfortunately, there is no any public maven repository with spigot/craftbukkit server (only API) Therefore, to get it you should build it yourself with BuildTools.jar.
Download BuildTools.jar here:
https://hub.spigotmc.org/jenkins/job/BuildTools/
Place it in empty folder and run
java -jar BuildTools.jar --generate-source --generate-docs --rev 1.15
This will build spigot + craftbukkit and add it to local maven as craftbukkit-1.15-R0.1-SNAPSHOT.jar
Add option --compile craftbukkit
if only spigot is builded,
This step should be repeated for all nms from 1.8 to 1.15 (look at LightAPI project folder "nms")
Another way is to add LightAPI-fork-3.4.2.jar to your local maven repository manually. To do it go to your folder with LightAPI-fork-3.4.2.jar and run the commands:
set PATH=<maven bin path>;%PATH%
set JAVA_HOME=<java home path>
mvn install:install-file -Dfile=LightAPI-fork-3.4.2.jar -DgroupId=ru.beykerykt -DartifactId=LightAPI-fork -Dversion=3.4.2 -Dpackaging=jar
Hope that helped :)
This means that your maven repository
Problem is, I am not building it, Jitpack is building it, I guess I will try to contact Jitpack, maybe they will come up with solution..
Maybe to add LightAPI-fork-3.4.2.jar to some public repository and use that
That would be great, I will try to find public maven repository, what could be used.
@Qveshn Found this one https://oss.sonatype.org/ from this article https://medium.com/@scottyab/how-to-publish-your-open-source-library-to-maven-central-5178d9579c5 , maybe that would work
ATM I am trying to make my repository at https://oss.sonatype.org/ There is not so simple. It needs time. Administartors from sonatype want something from me. I do not understand much. :D Be patient please
Hi I did some tests in sonatype I tried to deploy release but this is not simple. There are many requirements for artifact (sources, javadoc, additional attributes in pom, signature etc)
Therefore today I decided to start first with snapshot-version I have deployed it. I do not think that this is final variant of snapshot (I am studing sonatype and may be I remove it or re-deploy).
But now you can try to use dependence in your pom like:
<repositories>
...
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
...
<dependency>
<groupId>io.github.qveshn</groupId>
<artifactId>LightAPI-fork</artifactId>
<version>3.4.2-SNAPSHOT</version>
</dependency>
</dependencies>
I have tested this. My project was built succesfull :)
NOTES: packages in jar are still "ru.beykerykt.lightapi" but group id in pom is "io.github.qveshn". I know that this is not good. But this plugin is a fork. I do not want to change packages to prevent break other plugins from other authors who used it for a long time (sorry for english)
Hi Have you tested my public deployment?
Hey,
I will try to test this ASAP
Have you tested public repository for LightAPI-fork?