Hello, I'm trying to build with Maven in Intellij, but it won't let me use com.mojang.authlib. If i use Project Structure and add an spigot.jar file it works, but only if i build artifact. My Dependencies: https://cdn.discordapp.com/attachments/671081890710552584/671081920918061065/dependencies.png Jar File: http://prntscr.com/qt6e7t My question is how do i add the .jar file while building with maven, or what is the repo?
That really doesn't help, i know how to add spigot api dependency, i just don't understand how to import the kar file while building with spigot...
You don’t import any kind of jar. You setup your dependencies through maven. There are tutorials and videos online you can view for this. The link I provided provides you with the dependencies you need to specify in your pom.xml
I know how to use pom, and i know how import spigot and such, i just don't know how to import com.mojang.authlib
you need to depend on the singular 'spigot' dependency (the artifact id) if you want to access such classes: Code (XML): <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>VERSION</version> <scope>provided</scope> </dependency>
You will need to find the repo for the com.mojang.authlib dependency if you want to use it through maven, or add the jar to your local repo Though what would you need authlib for on a server..?
Idk if im dumb, but where do i use the Code (Text): mvn install:install-file \ -Dfile=<path-to-file> \ -DgroupId=<group-id> \ -DartifactId=<artifact-id> \ -Dversion=<version> \ -Dpackaging=<packaging> \ -DgeneratePom=true from https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project? Like where do i use the command EDIT: I found out i used: Code (Text): <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/spigot-1.8.8-R0.1-SNAPSHOT-latest.jar</systemPath> </dependency> Thanks for helping guys!
I know this is an old thread but it still shows up on google's search results when you search for this issue. I had the same problem and I've found the solution, add this to your pom.xml: Code (Text): <repositories> <repository> <id>minecraft-repo</id> <url>https://libraries.minecraft.net/</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.mojang</groupId> <artifactId>authlib</artifactId> <version>1.5.21</version> <scope>provided</scope> </dependency> </dependencies> Note that you might need to change the version depending on the MC version