| Can't seem to get M2E to work properly in Indigo [message #701760] |
Mon, 25 July 2011 10:48  |
Eric Kolotyluk Messages: 8 Registered: November 2010 Location: Vancouver |
Junior Member |
|
|
I downloaded a fresh copy of Eclipse for Java Indigo. It seems to have built in support for m2e, but I cannot get it to do anything useful. I can open my pom.xml files in the editor, but that's about all. There appears to be no m2e integration into any of the eclipse menus - for example there is no way to run any maven processes.
Am I missing something simple somewhere, or is m2e in Indigo really broken?
Cheers, Eric
|
|
|
|
| Re: Can't seem to get M2E to work properly in Indigo [message #702057 is a reply to message #701884] |
Mon, 25 July 2011 18:52   |
expressoCoder Messages: 2 Registered: July 2011 |
Junior Member |
|
|
Assuming this is not a pre-exisiting project that did not use the older m2eclipse plugin, follow instructions below. Older m2eclipse projects have stale stuff sitting around in .classpath, .project and .settings folder which need to be removed.
First open the Maven Console:
Choose the menu Window > Show View > Console.
In the upper right hand corner of the Console, there are a bunch of icons.
Find the Open Console icon, and from the drop down menu, select Maven Console.
Now right click on your project and choose:
* Maven > Update Project Configuration
* Maven > Update Dependencies
And see what error messages are being shown in the Maven Console.
[Updated on: Mon, 25 July 2011 18:53] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: Can't seem to get M2E to work properly in Indigo [message #725548 is a reply to message #714103] |
Thu, 15 September 2011 02:54   |
Eugene Kiselev Messages: 2 Registered: September 2011 |
Junior Member |
|
|
Hello colleagues.
It seems my M2E doesn't work with Indigo J2EE as well.
Here is what I'm doing step-by-step:
1. File -> Import -> Check out Maven Projects from SCM or Existing Maven Project checked out before
2. Show it the path -> It finds only one pom file - the global one. All the other poms which are located in subdirectories aren't found but I think this is expected.
3. It imports project but there is only JRE env on the BuildPath screen so all my sources are highlighted in red as there are no any libraries in the classpath.
4. I right click on the project and choose Maven -> Update Project Configuration and after that Update Dependencies.
5. It downloads jars into repository and doesn't update the BuildPath so I still have the compilation errors.
6. Adding the M2_REPO variable to the BuildPath doesn't help of course as it's pointing on the repository root and eclipse doesn't collect the information about all those jars hidden inside repository.
7. I stuck here
Also I tried to run the mvn eclipse:eclipse but it doesn't update the .classpath.
I had to create the shell script which runs through the repository and extracts all the jar paths and updates the .classpath file. But this is ridiculous as in this case I don't need the m2e plugin at all 
The maven version installed in my system is 2.2.1.
Same project imported into IntellijIdea CE has no issues. All dependencies are resolved there and code is compiled well.
I still struggling to make it working in Eclipse before migrating to Idea if this is hopeless.
Any help will be very appreciated. Thank you.
[Updated on: Thu, 15 September 2011 04:17] Report message to a moderator
|
|
|
|
|
| Re: Can't seem to get M2E to work properly in Indigo [message #730218 is a reply to message #729774] |
Tue, 27 September 2011 18:55  |
Tom Messages: 16 Registered: April 2010 |
Junior Member |
|
|
|
Suggestion if you are still having trouble: Delete all your projects from your eclipse workspace, delete the .classpath, .project, and everything in the .settings folder, and re-add them as new Maven projects. Going through that process solved a world of problems for me!
|
|
|
Powered by
FUDForum. Page generated in 0.01881 seconds