aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Need a Maven/m2eclipse mentor, PLEASE! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Need a Maven/m2eclipse mentor, PLEASE!" Watch "Need a Maven/m2eclipse mentor, PLEASE!" New topic
Author

Need a Maven/m2eclipse mentor, PLEASE!

Christopher Burns
Ranch Hand

Joined: Oct 21, 2008
Posts: 33
Hi gang,

I am hoping I can find someone's brain to pick with a handful of issues I am having in our migration away from Ant and into Maven.

We are a J2EE shop, developing on Europa and Ganymede, Spring, Struts, Velocity, sitting on Oracle 10g.

I have been spearheading the migration to Maven, CruiseControl, and Cobertura; however, my Maven efforts keep getting thwarted by either a lack of decent, COMPLETE documentation or (more likely) my own inability to grasp some elusive concept, or setting.

So, quick nutshell... I am running Ganymede, m2eclipse, and Nexus as our repo manager. It appears that I have everything set up correctly, however, in the Maven Indexes view for eclipse, when I expand my local repo, I do not see all of the indices that are in the Public Repositories that I see when I view them in Nexus. I cannot find reference for this at all, so I don't know if I am not understanding how m2eclipse works, or if I have something mucked up in my settings.

This leads to the next issue, which is that I am trying to create a brand new Maven project for one of our simplest projects (a library project with 2 external JARs as references), but I cannot get to the JARs via the repository because I do not see the version we use of one, and do not see the other at all. Both are in the Public Repos index when I look in the Nexus Repo Manager.

Would some kind soul take pity on my age-addled brain and help me get over this hump?

Thanks a million,

Chris


"It is our choices, much more than our abilities, that make us who we are."
- Albus Dumbledore
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Chris,

Have you got the book "Maven The Definitive Guide"? It's free from the Sonatype website and covers all of these things in detail, I'm betting it'll help you solve your issue.

Oh and make sure Nexus is talking through your proxy to the outside world properly (look at the logs it'll tell you if it's failing).


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Christopher Burns
Ranch Hand

Joined: Oct 21, 2008
Posts: 33
Hey Martijn,

Thanks (again) for coming to my rescue... you don't have shiny armor and ride a horse while you are coding do you?

I do have "Maven: The Definitive Guide" but the m2eclipse chapter is essentially the same as all of the sites and pages I have been cobbling my information together from.

Nexus is definitely talking to the outside world. I have added a bunch of other repos:


Here is the top of the list of indices in my Public Repositories in Nexus:


And here is what I see in eclipse's Maven Indexes view:


This shouldn't be right, should it? Shouldn't I be seeing EVERYTHING in the Public Repositories list? I DO see all of the indices the show in eclipse in Maven, just not the other way around.

Thanks,

C
Christopher Burns
Ranch Hand

Joined: Oct 21, 2008
Posts: 33
This just got me over one understanding hump... I am looking at my LOCAL repository (hence the ...\.m2\repository), which has exactly the indices I see when expanding that node in the eclipse Maven Indexes view.

So now I just need to add my locally running Nexus managed repo.

I have tried (which is the URL I use to access the management screen), but I keep getting "Resource nexus-maven-repository-index.properties does not exist".

I am searching for the resolution now, but if anyone has any info, I would appreciate it.

Cheers,

C
Christopher Burns
Ranch Hand

Joined: Oct 21, 2008
Posts: 33
Ok... adding the Index as worked.

Now my question is why doesn't m2eclipse pick this info up from the settings.xml file in the .m2 folder? I know that is a Maven resource, but it seems that the two should share that info (Maven and m2eclipse). Right?

So am I doing something wrong there?

Cheers,

C
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Well done on resolving it! I just came back expecting to point out the local v remote repository thing, but I see you've figured that all out now . I don't actually use the eclipse plugin (just Nexus and/or Artifactory) as I've found it to have too many little quirks, which is what I expect you're seeing from your last post.

Don't hesitate to post again if you have further Maven troubles!
Christopher Burns
Ranch Hand

Joined: Oct 21, 2008
Posts: 33
Thanks, Martijn. I certainly will.
Eugene Kuleshov
Greenhorn

Joined: May 01, 2009
Posts: 1
In regards to picking up settings from .m2/settings.xml, it is simply hasn't been implemented. If you are interested in such feature please post to m2eclipse mailing list or open an enhancement request at https://issues.sonatype.org/browse/MNGECLIPSE

regards,
Eugene
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need a Maven/m2eclipse mentor, PLEASE!