Eclipse- Maven -Spring - eclipse

I installed eclipse Luna.At that time Maven option was displayed in window-- preferences.Later i install spring ide.After installation maven got disappeared.pls help me to come out of this

Eclipse is well known for working oddly despite the correct settings and configuration. (As most of free IDEs').
Try to click to your project, then Configure and select Convert to Maven project.
Also clicking to your project and selecting the Clean may help since it removes all the files that are generated automatically.

Related

How do I mavenize a JSF 2.0 project in eclipse?

I have a JSF 2.0 project on my eclipse. I would like to mavenize the same preferably from Eclipse itself. I tried doing it from outside the eclipse manually. There are quite a few steps and I don't like the manual nature of that approach. Could someone help?
Make sure that you have the standard folder structure as recommended by Maven for web projects. Follow this link.
Now, install maven plugin in eclipse (am not sure if it is available by default or we have to download it manually). Simply right click on the project, select Configure and Convert to Maven Project. This should automatically do all that steps to takes to mavenize your current project. This will create a pom.xml file and you can modify it going forward as per your requirements. By the way, I use Eclipse Juno.

Missing Maven Dependencies Folder in Spring Tool Suite

I'm currently attempting to configure a Maven project in Spring Tool Suite for use with Tatool. I was watching this tutorial video and my project is identical to his after it is created except for the fact that it is missing a Maven Dependencies folder and I am also unable to "create" new dependencies (although I can add them). What gives?
Apologies in advance for the elementary nature of this question, but I'm new at this.
I am guessing that either:
Your project is not a maven project. Right click on project -> Configure -> Convert to maven project
You do not have m2e installed. Open STS dashboard, click extensions at bottom and install m2e
Nevermind, resolved it. The tutorial was using an old version of STS which had a "create" button in addition to the "add" button under the dependencies tab of the POM. All I had to do was add a dependency and the folder showed up.

How to fix error "Updating Maven Project". Unsupported IClasspathEntry kind=4?

I have imported maven project in STS, when I run update update project I receive:
"Updating Maven Project". Unsupported IClasspathEntry kind=4
Is there a workaround for this?
This issue has been fixed in m2e 1.5.0 which is available for Eclipse Kepler (4.3) and Luna (4.4)
Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=374332#c14
The problem is caused by the fact that STS (the Spring IDE/Eclipse), as well Eclipse and other Eclipse based IDE's, use the m2e(clipse) plugin but that eclipse:eclipse has been probably been run on the project. When m2e encounters a "var" .classpath entry, it throws this error.
The update sites are specified at the following url:
http://eclipse.org/m2e/m2e-downloads.html
If you can't use m2e 1.5.0 for any reason, then :
Disable the maven nature for the project (via the right-click menu)
Run mvn eclipse:clean (while your project is open in STS/eclipse). Depending on the timing, you might need to do a refresh or two on the project before re-enabling the maven nature. You should be able to see that your project has lost it's Maven nature. (The eclipse:clean goal just deletes the .project, .classpath and .settings/ files/directories. You can also just remove those files (again while the project is open) instead of running mvn eclipse:clean.)
Re-enable the maven nature.
(Most of the time, this can be done by right-clicking on the project in question in the package explorer pane, and then choosing 'Configure'-> 'Convert to Maven Project')
Right-click on your project, select Maven -> Remove Maven Nature.
Open you terminal, go to your project folder and do mvn eclipse:clean
Right click on your Project and select “Configure -> Convert into Maven Project”
Now you got “Unsupported IClasspathEntry kind=4 Eclipse Scala” disappear.
Sometimes, even re-importing the Maven project will not work. Updating the project correctly in eclipse is not a deterministic process.
The only 100% fail safe procedure I've found is:
Disable Maven Nature, run mvn eclipse:clean, restart, cross your fingers and Pray 3 times.
If this won't work, delete the project, run mvn eclipse:clean, re-import refresh, pray and use the force.
If this still doesn't work, restart Eclipse, or even better your computer. While waiting for the reboot, you can make a random donation to fix your Karma. Repeat step 2 and don't forget to pray and control your anger. Anger leads to hate. Hate leads to suffering.
Try all the other answers posted in this thread. You might need to try them all for 3 times at least before giving up.
Format your Computer, re-install Eclipse and Maven. No need to pray anymore, all gods hate you anyway
Delete your git project, burn the physical drive that stored the remote repository, and write your project from scratch.
Find a time machine, travel to the past and convince yourself to follow another, non-programming career or at least to avoid Java
Make sure that the version of the m2e(clipse) plugin that you're running is at least 1.1.0
Close maven project - right click "Close Project"
Manualy remove all classpathentry with kind="var" in .classpath file
Open project
or
Remove maven project
Manualy rmeove .classpath
4 Reimport project
Have you tried:
If you have import project into the eclipse 4, please delete it.
In maven consol, run: mvn eclipse:clean
In Eclipse 4: File -> Import -> Maven -> Existing Maven Projects
Seeing all other answers. I found for me a simpler way.
I just removed all lines in the .classpath (editing with eclipse) containing a var and used maven -> update project without an error.
This error is also thrown if the update command is used on a project instrumented for code coverage with Clover.
To resolve in this scenario:
Un-instrument the project folders you wish to update.
Run the maven update then instrument for code coverage again.
I tried Marco's steps but no luck. Instead if you just get the latest m2e plugin from the link he provides and one by one right click on each project -> Maven -> Update Dependencies the error still pops up but the issue is resolved. That is to say the warnings disappear in the Markers view. I encountered this issue after importing some projects into SpringSource Tool Suite (STS). When I returned to my Eclipse Juno installation the warnings were displaying. Seeing that I had m2e 1.1 already installed I tried Marco's steps to no avail. Getting the latest version fixed it however.
I couldn't get mvn eclipse:clean etc to work with Kepler.
However I changed creating and extending variables to just using external jars in my eclipse classpath. This was reflected in no var's in my .classpath.
This corrected the problem. I was able to do a Maven update.
This issue (https://bugs.eclipse.org/394042) is fixed in m2e 1.5.0 which is available for Eclipse Kepler and Luna from this p2 repo :
http://download.eclipse.org/technology/m2e/releases/1.5
If you also use m2e-wtp, you'll need to install m2e-wtp 1.1.0 as well :
http://download.eclipse.org/m2e-wtp/releases/luna/1.1
Upgrading from Kepler to Luna worked for me.
I had just added some components for Java 1.8 support. It seems that they where not as compatible as I would like or that I mixed the wrong ones. It really caused a lot of problems. Trying to update the system reported errors as they couldn't fulfill some dependencies. Maven upgrades didn't work. Tried a lot of things.
So, if there is no reason to avoid the upgrade just add the luna repository to avalilable software sites (Luna http://download.eclipse.org/releases/luna/ ) and "check for updates". It is better to have all the components with the same version and there are some nice new features.
I tried all the steps mentioned here and on similar questions but couldn't solve this problem. I could neither solve problem nor update my m2eclipse. So I installed Eclipse Luna and it solved my problem... though it mean that I had to spend about 45 min to configure all the environment in my workspace.
Try
mvn clean install eclipse:eclipse -Dwtpversion=2.0 command on DOS command prompt.
Suggesting you because , It worked for me!!
I'm using Eclipse 4.3.2 (Kepler) with M2E 1.4.x and felt over this problem several times!
In my case the "mvn eclipse:eclipse" command also generates Checkstyle, PMD and Findbugs configuration so "mvn eclipse:clean" does not help me because it drops all those config files again.
The best solution for me was to delete all ".classpath" files:
find . -name ".classpath" -delete
and import the project into eclipse afterwards.
Before importing the project, it should be converted into eclipse project
mvn eclipse: eclipse
Then i found the following error.
An internal error occurred during: "Importing Maven projects".Unsupported IClasspathEntry kind=4
Where is the value kind = "var" that M2E does not recognize and therefore throws the error.
Now type this.
mvn eclipse: clean
Now refresh the project in eclipse or re-import.

Problem installing Maven plugin (m2eclipse) in Eclipse (Galileo)

I have Eclipse Galileo (for Java EE Developers) installed, and I'm now trying to get the m2eclipse Maven plugin installed as well.
I follow the basic steps described at http://m2eclipse.sonatype.org/installing-m2eclipse.html, and it seems to be installing just fine. However, after restarting Eclipse after the install it doesn't seem to be anywhere. I should for instance have the ability to create a new maven project, but when the new-project wizard opens, there is no folder for Maven (I also cannot find any reference to it in the context menus of the existing projects I have).
When I click at Help > About Eclipse > Installation Details, I find "Maven Integration for Eclipse (Required)" in the tab "Installed Software", yet another thing pointing towards a successful installation (but I can't find it under the "Plug-ins" tab, should it be there too?)...
I feel like I'm just missing something very obvious, but right now I just don't see it...
I managed to find the answer to this myself:
I had put the Eclipse installation folder under c:\Program Files\, but when I moved it directly under c:\ instead, the plug-in installation worked just as it should. I assume that is because Eclipse wasn't allowed to write to its own installation folder (but I didn't get the usual question from Windows that something was trying to access Program Files either...).
In one way I feel like I should be a bit ashamed that I didn't think of this before. On the other hand though, there could have been some reasonable error message stating that something failed during the plug-in installation...
Well, I hope this at least helps somebody else as well :)
Did you check the m2eclipse installation requirements?
In particular, you need WTP.
"Maven integration for Eclipse" (core feature) and optional "Maven POM Editor" feature depend on the "Eclipse XML Editors and Tools" feature from WST
"Maven integration for WTP" feature provides Maven project configuration for WTP
Did you have a previous version of m2eclipse installed? Did you uninstall it before to install the latest version? Just in case, does the following note applies to you?
Note about 0.9.8 Workspace Incompatibility: If you are using
m2eclipse 0.10.0 with a workspace that
contains projects created under
m2eclipse 0.9.8, you must remove the
workspaceState.ser file. The
workspaceState.ser file is located
within the workspace directory in
$workspacedir/.metadata/.plugins/org.maven.ide.eclipse/workspaceState.ser.
If you remove this file, m2eclipse
0.10.0 will regenerate it as needed.
In my case, uninstalling the previous m2eclipse version didn't work and I had to start with a fresh Eclipse install (maybe try this also).
Regarding the plugin tab, this is what I have (to confirm that you should definitely find something):
alt text http://www.imagebanana.com/img/84h6mw8z/screenshot_008.png
Note that I also installed some extras from m2eclipse Extras Update Site: http://m2eclipse.sonatype.org/sites/m2e-extras
I was able to solve this problem by going into Program Files, right click on the eclipse.exe file and select "Run as administrator". When I restarted Eclipse it said I had no plugins installs so I reinstalled and my problems were solved.
PROBLEM SOLVED
I had this same problem and I used the following software site:
["M2Eclipse - http://download.eclipse.org/technology/m2e/releases/1.0] (without square brackets) to download the M2Eclipse plugin in Eclipse 3.7.0 (Indigo). For more information refer this.
To solve the problem of 'not getting Maven plugin running in eclipse' , it can be solved by altering admin rights to the .m2 folder . Right click on .m2 folder and go to network sharing. give all rights to all users. Restart eclipse and maven options will start to appear in Eclipse.

m2eclipse and Eclipse WTP

I have a very large workspace with about 30 projects all together. I am using Eclipse 3.5 with m2eclipse. I check out of my subversion repository using the defaults in order to import the projects into my workspace.
I create a Tomcat server instance, and publish my web project to the tomcat server. Sounds easy enough.
The problem is that it does not appear as though the transitive dependencies for my other projects are being automatically added to the container, so when the container starts up I get classnotfound exceptions, etc.
I go into the web project's properties, and I notice that the Java EE Module Dependencies are NOT checked for some of the transitive dependencies. I check them, and everything seemingly works until I do a project clean build, when the Java EE Module Dependencies are automatically reset by eclipse, so I need to recheck them. This is maddening, and I was hoping there was some way to automatically pull in all of the transitive dependencies when working with Eclipse WTP.
I should mention, using standard maven build works just fine, and everything gets pulled in appropriately into the resulting WAR file. It just doesn't work so good with WTP for some reason.
You need to make sure that you have "Maven integration for WTP" feature from m2eclipse installed. There is a simple tutorial available at http://docs.sonatype.org/display/M2ECLIPSE/WTP+mini+howto
What version of WTP and m2eclipse you are using? Check that dependency version declared in project's pom.xml matches with version declared in workspace project and make sure that workspace dependency resolution is enabled.
Also, you can try to run "Maven / Update project configuration" from the project popup menu and check that there is no errors on Maven console and in Eclipse's own log.
If the above won't help, try to reproduce issue on a smaller project and then submit it with a bug report
It appears as though the latest version of m2eclipse (.99x) solves all of my issues.
If you are tempted to use m2eclipse wtp extras you need to be aware that they are not supported by Sonatype and, although mostly OK, are not 100% robust.
See http://maven.40175.n5.nabble.com/What-is-the-recommended-alternative-to-m2eclipse-extras-WTP-integration-td135727.html