This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven central Repository: issue with Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven central Repository: issue with Eclipse" Watch "Maven central Repository: issue with Eclipse" New topic
Author

Maven central Repository: issue with Eclipse

Francesco Bellini
Greenhorn

Joined: Nov 01, 2012
Posts: 26

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.
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2274
    
  28

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
Greenhorn

Joined: Nov 01, 2012
Posts: 26

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?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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).


JBoss In Action
Francesco Bellini
Greenhorn

Joined: Nov 01, 2012
Posts: 26

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.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Francesco Bellini
Greenhorn

Joined: Nov 01, 2012
Posts: 26

No, this is the default repository hard-coded into Maven: http://repo.maven.apache.org/maven2.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven central Repository: issue with Eclipse
 
Similar Threads
Can't find correct Mule Repository
Maven: Trouble loading a dependency from a local repository
Why is Eclipse/Maven project not picking up the values from settings.xml?
Many Maven repositories in pom.xml or settings.xml mirrors
error while running maven