• 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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.
 
Sheriff
Posts: 22147
115
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: 6919
163
  • 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: 12878
279
  • 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.
 
Rancher
Posts: 3844
50
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic