Curtis,

Thank you for your reply.  It actually gave me an idea that solved my problem.

To get Eclipse and Maven recreate the Maven Dependencies in my Java Build Path 
I ran Maven -> Update Projects..... first without a settings.xml file which did 
recreate the entry, but with the errors because without the settings.xml file 
Maven could not access my remote repo.  Then I ran it again with my 
settings.xml file in my .m2 directory and all the errors in my Maven 
Dependencies entry in the Java Build Path are now correct.

I have been going back and forth on this for the past few weeks (since my 
original post) so I cannot say what prompted me to remove the Maven 
Dependencies from the Java Build Path.  It is possible I was just curious to 
see if Maven -> Update Projects would refresh the entry.

I am now going to see if this fixes the situation in my Windows environment.

Michael Tarullo
Contractor (Engility Corp)
Software Engineer
FAA WJH Technical Center
(609)485-5294


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
Curtis Rueden
Sent: Tuesday, June 14, 2016 12:09 PM
To: Maven Users List
Subject: Re: Maven and Eclipse

Hi Michael,

> I removed the Maven Dependencies entry from the Java Build Bath 
> Libraries tab

I don't understand why you are doing this step. It should never be necessary in 
my experience, and my intuition is that it could hose things up. The Maven > 
Update Project... command in the Package Explorer context menu (when you 
right-click a Maven project) should rebuild the contents of the Maven 
Dependencies list automatically, and hence keep your build path up to date.

The workflow to get up and running on a target system (Windows, Linux or
otherwise) should be the same:

- Clone the project from your SCM to a local directory
- File > Import > Existing Maven Project...
- Select the local directory you just cloned
- Next a couple of times, and you're done.

And updating should be as simple as:

- Update from your SCM
- *Maybe* quick-fix to "Update Project..." if Eclipse complains about the 
pom.xml being out of sync. This will likely depend on how you updated from your 
SCM: through Eclipse or externally.

Glad that you figured out about the settings.xml file.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know 
ImageJ has a forum? http://forum.imagej.net/


On Tue, Jun 14, 2016 at 10:53 AM, <[email protected]> wrote:

> Further information on this issue:
>
> I earlier reported that my fresh install of Eclipse Mars 2 in a Linux 
> environment did create a Maven Directories entry when executing Maven 
> -> Update Project, but that I noticed a problem with the actual jar 
> files this entry was pointing to and that they were not loaded into my 
> local repo from my remote repo.
>
> It appears this behavior was because I neglected to port my 
> settings.xml file to the .m2 directory and this file contains the 
> credentials to log in to my remote repo.
>
> So, I copied my settings.xml file from my Windows environment and 
> updated the location of my local repo in settings.xml with my Linux 
> path to my local repo.  Then I removed the Maven Dependencies entry 
> from the Java Build Bath Libraries tab, removed all the directories in 
> my local repo and executed Maven -> Update Project.....; this time I 
> received the same results that I did in my Windows environment where 
> my Eclipse upgrade to Mars 2 was not from a fresh install.
>
> Once again, I hope this is helpful.  And sorry for any confusion the 
> first post may have caused.  I just completely forgot about the settings.xml 
> file.
>
> Michael Tarullo
> Contractor (Engility Corp)
> Software Engineer
> FAA WJH Technical Center
> (609)485-5294
>
>
> -----Original Message-----
> From: Barrie Treloar [mailto:[email protected]]
> Sent: Wednesday, June 08, 2016 7:33 PM
> To: Maven Users List
> Subject: Re: Maven and Eclipse
>
> On 9 June 2016 at 01:00, <[email protected]> wrote:
>
> > Thanks Curtis!
> >
> > That's exactly what I did.
> >
> > As soon as I get a chance, I'll try a fresh install of Mars 2 and 
> > see how it goes.  I usually do my Eclipse upgrades with fresh 
> > installs, this is the first time I tried to upgrade from a previous version.
> >
> > Mike
>
>
> And when you resolve the issue, can you post back your findings for 
> search engines to find.
>
> Thanks.
>

Reply via email to