• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven central Repository: issue with Eclipse

 
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I use maven with Eclipse Juno and I've noticed that the Maven Repository tab doesn't show the content of Global Repositories -> Central if expanded.
Usually, the repositories can be browsed, but it seems that the default one (and I don't understand where it is defined) not.
Here's the picture:


So, I've added the following piece of XML code in my .m2/settings.xml:

The repository above can be "expanded" in the Maven repository browser within Eclipse.

My question is: where the default Central Maven repository is defined? I've searched in the settings.xml within the maven installation directory (on Windows 7) but I don't see any http://repo.maven.apache.org/maven2 occurrency in it.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All POMs inherit from a Super POM. The Super POM is somewhere inside Maven (I have never found it.. possibly packaged inside one of the maven jars). The Super POM contains the central maven repo.
 
Francesco Bellini
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the information. I was actually wandering if there wouldn't be some URL hard coded in the maven sources. And that's it.
Well, and why is such repository not expandable within the Eclipse Maven repository tree tab?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maven Central is not browsable (it used to be ages ago...), hence the reason why it will not expand in Eclipse. If you go to Maven Central (in a browser), you will be redirected to a search facility. However, for most contexts you can still access Maven Central directly (I do it all the time).
 
Francesco Bellini
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good to know! And by the way is http://repo1.maven.org/maven2 a good maven central repository alternative or not? Sometimes I get missing artifact when trying to add dependencies, but it may be due to the version I am choosing at that moment.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I think that repo1.maven.org/maven2 is the default repository hard-coded into Maven.

However, as Peter noted, browsing this repository via a web browser isn't what it used to be.
 
Francesco Bellini
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, this is the default repository hard-coded into Maven: http://repo.maven.apache.org/maven2.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I get a missing version, I usually browse Maven Central to see what is available. At times the version number is declared but only a POM is present, no JAR, in which case I revert to an earlier version.

In my dev environment we use Nexus and have several repository proxies defined and usually the problem I run into is some of the other proxied repositories defining stupid version numbers that don't have JAR files (I won't name any names but a certain Linux company whose name is associated with headgear and which owns a certain application server has oddly-versioned copies of various artifacts which always mess up my dependency version ranges. Ticks me off to no end. Unfortunately we need to include their Frankenstinian repository because some of our projects need JARs available only there.)
reply
    Bookmark Topic Watch Topic
  • New Topic