#Maven local dependency fails to resolve

1 messages · Page 1 of 1 (latest)

fiery ruin
#

I have two projects, one is called ObsidianMC and is a library, the other is called StormerWarps and is using that library.
I had managed to get Warps to package by some miracle (it was using the very first build of ObsidianMC)
i have since updated ObsidianMC and Warps wouldn't be able to see thoses, and changing the ObsidianMC dependency version was failing to resolve.

i have now deleted the .m2 folder and recreated it, but now it just wont resolve at all

shrewd zenithBOT
#

This post has been reserved for your question.

Hey @fiery ruin! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

fiery ruin
sterile thunder
#

Isn't it supposed to be 0.1.3-SNAPSHOT?

fiery ruin
#

lemme recheck i might be dumb

#

ok no it does the same problem as earlier

#

the POM.xml is happy and finds the dependency

#

so i have compeltion and stuff

sterile thunder
#

What do you do to make artifacts available?

fiery ruin
fiery ruin
sterile thunder
fiery ruin
# fiery ruin
[WARNING] The POM for fr.stormer3428:ObsidianMC:jar:0.1.3-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.307 s
[INFO] Finished at: 2023-02-17T20:15:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project StormerWarps: Could not resolve dependencies for project fr.stormer3428:StormerWarps:jar:1.0.14-SNAPSHOT: fr.stormer3428:ObsidianMC:jar:0.1.3-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

sterile thunder
fiery ruin
#

OOOHHH

#

basically some common code across minecraft plugins that handles Command registering, autocompletion, and other things of the likes i dont want to have to recode at every new plugin i make

#

i might've understood your question wrong

sterile thunder
#

What are the operations you made so that, after deleting your m2 repository, it would be valid to use artifact ObsidianMC in other projects?

fiery ruin
#

this as well as building each of them (except warps since it fails)

i suppose this means i'm missing something i should've done

#

i forgot to mention i'm a newbie to maven, so i'm still learning and missing key concepts

sterile thunder
#

Okay direct question : do you remember to do mvn install before trying to use a project elsewhere?

fiery ruin
#

no, absolutely not

#

let me do that

#

my god i'm such an idiot

#

thank you

sterile thunder
#

I mean you can't guess the command, but indeed artifacts need to be somewhere they can be found before you can use them

fiery ruin
#

i thought package did that since it generates a jar in the target directory

#

even a shaded one as well

sterile thunder
#

That's local to the project you do that for. If you want what you do to be relevant to things that aren't that project, you need to install, publish or release

fiery ruin
#

well now i know x)

#

i was confused on why it worked before, i guess i must've done an install at one point trying stuff out

sterile thunder
#

tutorials often recommand so, so it's possible

fiery ruin
#

probably yeah. anyways thank you again