#Maven Import Issue (Don't wanna interrupt convo)

1 messages Β· Page 1 of 1 (latest)

river flint
#

Hey so I am trying to play around with NMS to get to know it and I'm stuck on the importing part of it. Every time I add the dependency I get an error despite Maven being able to find it. Any ideas?

earnest robin
#

did you run buildtools

river flint
#

do I run it in the project directory?

earnest robin
#

just in general on your PC

river flint
#

Yes I've run buildtools

gentle sparrow
#

?bootstrap

earnest robin
#

including the --remapped paramter

#

?

gentle sparrow
#

I forgot the bot isn't in threads lmao

#

brb

river flint
#

No, it came with a remapped jar but it was missing classes

river flint
#

I would send a screenshot but I don't have embed perms (do I have to verify?)

earnest robin
#

yes

river flint
#

Alright 1 second

#

This is the problem, I got the dependency but it has an error

#

And nothing is underlined red inside of the dependency

earnest robin
#

can you build your project from your command line ?

#

might be intellj being trash

gentle sparrow
#

or quite possible you don't have the remapped jar

#

thus running the build cycle should give it to you

#

one of the reasons I don't mess with NMS

river flint
river flint
#

like

#

PacketPlayOutTitle

gentle sparrow
#

no harm in running the build cycle, worse that happens is that it errors but at minimum one of the easiest ways to pull in dependencies or also known as priming a project

earnest robin
#

remapped is mojang mapped

#

those names are spigot mappings

gentle sparrow
earnest robin
#

you should use mojang mappings anyway

#

(and titles have API these days, don't use packets for those)

gentle sparrow
#

however you can't get the remapped jar from a maven config, if you don't prime the project or run the build cycle at least once

river flint
#

So I should just build the project?

#

Or is build cycle a different term

gentle sparrow
#

try it, see what it does, it should at minimum produce a remapped jar somewhere

#

at least from what I am reading from the config you have

river flint
#

Alrighty

river flint
#

I just got this error

earnest robin
#

are you certain you ran buildtools with the --remapped parameter ?

river flint
#

here I'll do that

gentle sparrow
#

oh I see what might be the problem

#

remove the repository stuff and remove the spigot-api dependency

#

the spigot jar will have the api

#

thus adding the api as a dependency is redundant

river flint
#

That still gives me this error

gentle sparrow
#

what does that clean up broken artificats link do?

#

I don't use intelliJ so not familiar with everything it does

river flint
#

nothing useful in this case, it just reloads the project

gentle sparrow
#

should remove the repository stuff completely

#

unless there is something in there you need

river flint
#

still nothing

gentle sparrow
#

wonder if intelliJ is just not looking in maven local

#

did you confirm if the remapped jar is in your local maven repo?

river flint
#

I have this

#

doesnt look like any remapped.jar

#

oh but these

gentle sparrow
#

so it looks like buildtools didn't add them to local maven repo

#

you can either manually add them to maven local, or you could instead just point maven to where it is at specifically

#
mvn install:install-file -Dfile=<path-to-file> -DgroupId="group-id" \
-DartifactId="artifact-id" -Dversion="version" -Dpackaging="packaging"
#

the maven command if you want to manually install it into maven local

river flint
#

wait

river flint
#

I just ran buildtools with --remapped

#

perhaps it will work now

gentle sparrow
#

alright try it out

#

worse that happens is you get another error πŸ˜›

river flint
#

No sir!

gentle sparrow
#

nice

#

alright we figured out the problem πŸ™‚

#

also now you know ways to resolve it manually too

#

also, when depending on the server jar, you don't need the api jar

#

since the api is inside the server jar πŸ˜›

river flint
#

I figured that when I found spigot api inside the dependency, I just forgot to remove it

#

Also, now I can't find any of the packet classes

gentle sparrow
#

might have to also depend on the obf one too?

#

not sure

#

this is one of the reasons why I don't like bootstrap jars

river flint
#

Well this jar does have packet files however it is also missing PacketPlayOutTitle

#

oh wait

#

are they renamed?

#

yeah it looks like the classes are just named different πŸ˜