#Can't add dependencies inside pom.xml

1 messages · Page 1 of 1 (latest)

plain sail
#

It's my first time using IntelliJ Ultimate. When I tried to add spring.boot.starter.web inside pom.xml, however I found nothing but com.example:demo:0.0.1-SNAPSHOT which is my project.

I have googled a lot and asked ChatGPT too, but I haven't found any solutions to this issue. The only solutions to it is to type the entire name org.springframework.boot:spring-boot-starter-web
Even though, I still can't found some packages such as spring-boot-devtools.

The solutions down below are the ways that I have tried,

  1. reindex central (inside maven repositories), but I didn't see anything changed even any loadings.
  2. tried to update the repositories insides settings , however the updated column still remains empty

What should I do now? This problem is kinda annoying and stop me adding dependencies in the easy way.

shut forgeBOT
#

<@&987246527741304832> please have a look, thanks.

smoky mauve
#

not sure why the way you're doing it isn't working but you can manually add it to your pom.xml file (which is the more common approach)

#

in the search find what you're looking for e.g.

#

clicking on the first one (make sure to click on spring-boot-starter-web not org.springframework.boot) - will show you this

#

these are all the different versions available and by clicking on the one you want (e.g. the latest)

#

you'll have a copy and paste ready snippet for maven

#

just place that underneath the <dependencies> section of your pom.xml

#

if you get stuck - somebody else may help pick it up

#

though make sure to use the version that matches what version of spring you're using or if you have the Spring BOM, remove the line containing <version>

fringe dune
#

I think the intellij maven repo search is borked because that api is heavily abused (by IDE's and tooling) so it rate limited and fails a lot. Just go to the maven central website and do search there.

upbeat moon
#

writing the dependency's info on the pom.xml is only helpful when you're using netbeans idea, because it automatically download it
and this is the main reason I'm using apache netbeans idea
as for eclipse and IntiliJ they both need you to manually download the dependency and do the proper configuration also manually

fringe dune
plain sail
#

I was using vscode to write another language which allows me to add dependencies via IDE without adding manually.
Since I'm new to IntelliJ and Java, is it very common to add dependencies manually when writing Java?
For me, it seems error-prone while copying and pasting dependencies.

eager moth
#

but manual means looking up dependency versions and not going to every dependency link and downloading them and dragging them into the project folder

plain sail
eager moth
#

then i click on maven then copy the text

#

though these times i pretty much always use gradle instead of maven