• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Maven will not download any dependencies

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you get Maven to download dependencies from the maven central repository? I have been trying to get dependencies to work for three weeks now and I am at the end of my rope. I have tried three ides, Netbeans, Eclipse and Intelij and none of them can download any sources from Maven as they all fail. All I am trying to do is get a rest api to pull json data from github. I am attempting to use rallyRest to do so and have code that should work. I have attempted an approach with JAR files but there are too many transitive dependencies to have that work. None of the ides will tell me why the Maven repo download fails. This is driving me literally insane, can anyone help with this issue? It occurs on every computer I own so it is something that I am missing but cannot find the correct information anywhere as the documentation for Maven is the worst I have ever seen.
 
Marshal
Posts: 22445
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Can you try calling Maven from the command line? Just try mvn package. That will compile your code, run any unit tests you may have, and create the JAR file. Maven will tell you what's wrong. If you still don't get enough information, use mvn package -X -e instead. You're going to see all of Maven's debugging information, and the exception that causes the build error.

Can you also post the contents of your settings.xml? You can find it in your home directory, folder .m2. It may not be there, in which case you'll only get default settings (but those should suffice for building in most cases).
 
Saloon Keeper
Posts: 7090
165
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can you also post the contents of your settings.xml? You can find it in your home directory, folder .m2.


In particular, make sure the repo URL in that file uses HTTPS, not HTTP - which stopped working some time ago.
 
Saloon Keeper
Posts: 13248
291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jake Stuck wrote:but cannot find the correct information anywhere as the documentation for Maven is the worst I have ever seen.


I find this surprising. I find that Maven is very well documenten.

Anyway, what Java and Maven versions are you using? I seem to recall that Java 7 and older default to older TLS versions, while Maven requires TLS 1.2 these days.
 
Master Rancher
Posts: 4023
53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I second Rob regarding using the command line.  Focus your efforts there first... different people will have different IDEs configured different ways, and it will be harder for us to understand what's going on in your IDE.  But if you show us the command you run and the error message(s) you receive, we can give better feedback.

As for documentation, I would say that open-source projects in general often have very poor or bare-bones documentation.  Maven is pretty good in comparison to many.  But yeah, there's still plenty of room for improvement I think.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic