Eclipse Mars Configuration - eclipse

I am facing couple of problems with projects configuration in Eclipse Mars/Kepler.
Build Path is not coming for projects.
Ctrl + click is not working
Ctrl + Shift + T not working.
Package view is not coming got projects.
I did lot googling and tried, but none are working.

I finally found the issue.
Eclipse Mars has an embedded maven plugin installed and configured in eclipse.
This was different from the version of eclipse configures on my system which I was using to "mvn clean install" the workspace. So, pointing to my system configured maven and re-importing the projects resolved the issue.
Go to Windows --> Preferences --> Maven --> Installations and point to system maven.
My projects are compatible with maven 3.2.3 (system maven) and eclipse has higher version of maven.

Related

Eclipse Mars: No entry for Maven under Window-> Preferences

I have Mars2 version of Eclipse in my system. I had installed m2Eclipse to integrate maven with Eclipse from here http://download.eclipse.org/technology/m2e/releases, however, I do not find the option for maven in Eclipse, neither under preferences nor under perspectives. Is there some other version of m2Eclipse to be used with Mars2 or what else can be done to resolve this issue?
Currently, I have Apache Maven 3.3.9 installed in my system along with JRE 1.7. I have other plugins as well like subclipse, beyond compare, JUNIT etc which seems to be installed properly.
Do this:
Right click on your Project --> Select Configure --> Convert to Maven Project
m2eclipse is not required to be installed separately with Mars2. It is by default integrated with it when we download Mars2 binaries. Also, we should be targeting maven 3.3.3, since m2eclipse is version 1.6 which targets maven 3.3.3.
M2eclipse v1.7 targets maven 3.3.9 and is mainly targeted for Eclipse Neon

Maven found missing in Eclipse IDE (Mars) after installing m2e-egit

unable to create a maven project after installing the m2e-egit plugin; Obviously I don't see the maven option under Eclipse > Window > preferences
Tool used:
Eclipse Java EE IDE for Web Developers.
Version: Mars Release (4.5.0)
Try this :
Firstly, for Maven:
Eclipse > Help > Install new software and add http://download.eclipse.org/technology/m2e/releases.
Secondly, for m2e-egit:
Eclipse > Help > Install new software and add
https://repository.takari.io/content/sites/m2e.extras/m2eclipse-egit/0.14.0/N/LATEST/.
Because the version of m2e-egit in the Marketplace is outdated
Now restart eclipse.
It perfectly worked for me (Mars Version).
I had this same issue with m2eclipse-scala. I tracked the issue down to what seems to be multiple installs of the m2e plugin, one explicit and one implicit. This plugin gets installed by m2eclipse-scala if it's not already there (perhaps similarly to how m2e-egit operates). The base version of Eclipse that I'm using does NOT show m2e installed under Window > Installation Details, but all of the Maven buttons and toolbars are already present, and explicitly installing m2e makes them disappear.

Regarding Maven

I am new to Maven and if you feel i am asking really basic question then please forgive me.
I am facing couple of problems with Maven mentioned below.
I am using Eclipse Luna 4.4.1 (Which comes with the Maven Plugin).Now i installed two plugins..out of which one is for subclipse(with SVNKit) and m2e-Subclipse which is used for integrating the maven with SVN.I downloaded the project in eclipse using svn plugin as "checkout as Maven project" and i could see the project being downloaded and now to remove all the errors related with the POM.XML i downloaded the Maven and given the local path of the Maven in the preferences > Maven > installations and changed the Global Settings and user settings files which are project specific.
1). Now even after doing all this circus i still can not see the Maven build options in my Eclipse.
2). I am not even able to clean the project from command prompt.
when i go to my project directory and type "mvn -version" which shows me the correct version of maven.
But when i try to clean it using mvn clean. it does not work.
Please help.
Regards.

setting up a maven project in Juno Eclipse

I recently upgraded my Eclipse to Juno and am struggling with the way maven dependencies are handled.
I installed the m2e plugin. Still, many of my projects started complaining about libraries missing as if the dependencies specified in the pom were completely ignored. This happened despite right-clicking on the project, selecting Configure --> Convert to Maven project, which seems to be the replacement for what used to be "Maven --> Enable dependencies" before. When I looked at the Maven dependencies under the project directory, there were many fewer dependencies listed than in my pom.
Running a maven compile on the command line outside of Eclipse allowed my project to build and after selecting Maven --> Update project, I was able to see the dependencies added or removed accordingly to what I specified in the pom.xml.
Bottom line: maven dependencies seem to work now but I had to do some combination of operations I didn't think should have been needed:
- Configure -> Convert to Maven project
- Maven -> Update dependencies
- Run maven outside of Eclipse
To get everything to work when with previous versions of Eclipse, all I had to do was Maven -> enable dependencies. What is the equivalent of this in Juno, i.e. what is the correct way of setting up juno Eclipse to handle properly a maven project?
I have been using Juno for a while now and the reliable way to solve Maven dependencies from within Eclipse after importing a project that is maven based is simply:
Configure --> Convert to Maven project
Maven --> Update project
Running Maven outside of Eclipse doesn't seem to help.
I am not sure why these two steps are now required when they were not before with previous version of Eclipse (at least, two steps were not needed before for sure).
Running
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
outside of Eclipse has brought me the problems I described in my comment to the other answer.
On a Mac running Windows under Parallels Desktop on OS X? This similar discussion may solve your problem: intellij - java: Cannot find JDK '1.7' for module

Eclipse (STS) + Maven

I basically have 2 questions:
Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)
Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.
Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)
You could open a shell inside eclipse , cd into the right directory and run the maven console from there. But, when using M2Eclipse (see next point), you're not supposed to run eclipse:eclipse.
Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.
STS bundles M2Eclipse which comes with an embedded version of Maven (so it doesn't "unpack" Maven). But you can Configure M2Eclipse to use an external version. Go to window > Preference > Maven > Installations and Add... your external install:
Try the m2eclipse plugin from sonatype and you can eliminate use of 'mvn eclipse:eclipse' altogether. After installing m2eclipse and restarting eclipse, select File->Import->Maven->Existing Maven project. Browse to your maven project and select it. The m2eclipse plugin reads the pom and creates an eclipse project (this is the step that 'mvn eclipse:eclipse' gives). There are other useful features of the m2eclipse plugin including pom editor.
m2eclipse project is moving out of sonatype into the eclipse foundation project page and will be released on the Indigo train.
See this page for more info on m2eclipse: http://m2eclipse.sonatype.org/