#Help with using GitHub API in Java
1 messages · Page 1 of 1 (latest)
Wdym
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>your.main.class.if.any.MainClass</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
smth like this
idk i just got here
haven't seen your pom
i had this thing configured in my old plugin
Gotta send it later when im Back Home
Kinda Like Plugin updater
for your own?
You really don't need to specify a main class or that Manifest transformer
that's not my code
That's for creating an executable jar
Dont wanna publish it anyway
i'm just too lazy to find my own, it's probably deleted anyway
Just for my server
Yea
@upbeat vine My pom is https://paste.md-5.net/sisemezewo.xml
Does it still say it's missing the bukkit classes?
package org.bukkit does not exist
Does it say that in the IDE or when you package the jar with maven
when i do mvn package so when i package the jar
yea lol
are you making app or plugin lol
plugin
and when you run it console says org.bukkit does not exist
right
@upbeat vine Maybe you know?
oh my bad
forgot the d in provided
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>```
ok i builded it with maven shade plugin, like i used mvn clean package
like my plugin
is it working now?
yea, but the code with the api isnt working, like do you know someone who used the api before?
Same error as before?
no
also do i have to use the normal jar or the one with shaded at the end or the one with original
at de.ole101.newsc.Main.onEnable(Main.java:22) ~[?:?]```
repo looks kinda sussy
Repository name must be in format owner/repo
i got the repo link there
GitHub github = new GitHubBuilder().withOAuthToken("[OAuthToken]").build();
GHRepository repo = github.getRepository("RepoLink");
GHRelease release = repo.getReleaseByTagName("release");
Bukkit.getConsoleSender().sendMessage("§a" + repo.getOwnerName());
} catch (IOException e) {
throw new RuntimeException(e);
}```
My Link is, https://github.com/ole1011/[Repo]
.
Normal jar