|
Re: Import of Maven project - imports cannot be resolved. [message #1726362 is a reply to message #1726342] |
Fri, 11 March 2016 19:47 |
|
On 03/11/2016 08:56 AM, BARB Switzer wrote:
> MAVEN project was created with Intellij (Java).
>
> I imported the Project into Eclipse MARS. I can right click on the
> main pom.xml and Run a Maven build (clean compile) and
> build finishes successfully. I am using JDK 1.7
>
> But the Java Explorer view will have all my folders marked with a RED X
> indicating imports cannot be resolved.
>
> I defined the path in MAVEN user settings
> Local Respository: C:\Users\u6025245\.m2\repository
> User Settings: C:\Users\u6025245\.m2\Settings.xml
>
> Java -> BUild Path -> Class Path Variables does contain M2_REPO which
> points to my local .m2/respoitory
> Anyone know the secret to fixing this issue in Eclipse?
Did you use Maven from the command line inside the project root
directory thus:
$ mvn eclipse:eclipse
?
This has always worked for me.
|
|
|
|
Re: Import of Maven project - imports cannot be resolved. [message #1726793 is a reply to message #1726777] |
Wed, 16 March 2016 14:29 |
|
On 03/16/2016 06:57 AM, BARB Switzer wrote:
> Someone on my team suggested we import as a Java project then manually
> setup M2_REPO in the classpath. This in fact did bring the jars into
> Referenced Libraries but Eclipse still could not resolve, I did run
> eclipse:eclipse clean etc with no luck.
>
> I started over with a new workspace and this time imported as a MAVEN
> project using the built in M2e feature. This then brought all the jars
> into the workspace as Maven Dependencies.
> So problem solved. Thanks for your suggestion!
It would probably work if you do it BEFORE all the other effort you
tried. Again, it always has for me. Maybe for future projects you might
give it a try. (If it's convenient.)
Glad you're running now.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04470 seconds