Spring Starter Project in Eclipse -- Can not use Maven: M2E - eclipse

Eclipse Luna 4.4.2 with Java JDK 1.7
I installed
Spring IDE plugin version 3.7.3
Pivotal Software Spring Tool Suite(STS 3.7.3)
plugins successfully, have no problem with switching to the Spring perspective and my File->new->projects has several spring related selections.
I have been building using maven with no problems. My maven version is 3.3.3. Checking the Help->Installation Details dialog shows eclipse m2e-workspace 0.3.1
When accessing the Eclipse Marketplace, the dialog shows Maven Integration for Eclipse(Luna and newer) 1.5 and the update button is greyed out and there is an uninstall button, so I have that installed.
When selecting Spring Starter Project, I get the creation dialog box with an error message at the top reading --
Can not import using Maven because Can not use Maven: M2E (Eclipse
Maven Tooling) is not installed
I have also lost my maven sub-menu when I right click on pom.xml. Its no longer there.
Any ideas on a solution before I start removing things/changing things and possibly making things worse? Explanations also welcome.
Thanks

When installing the Spring IDE plugin into Eclipse that already has the maven plugin installed results in a serious conflict as Spring IDE also installs maven. It may be resolvable, but I was unable to find a solution.
I did uninstall the Spring IDE, but the problem was not cleared on Eclipse restart. I deleted the corrupted eclipse installation, while keep its workspace intact.
I finally installed STS w/eclipse and pointed it at my previous workspace.

I had the same issue and I have no idea of how to fix that.
To turnaround the this problem, I downloaded the Spring Tool Suiteā„¢ by the url: http://spring.io/tools/sts/all
This Suite have all the tools to build any Spring project that you'll want.
Hope this work for you.

Related

NoClassDefFoundError org.eclipse.m2e.wtp.WTPProjectsUtil upon Maven build Eclipse

I've installed the Websphere Development tools in STS 3.3.0 (Juno 3.8.2 version) as well as the m2e wtp connectors. I'm now having issues with building in Maven. I'm getting the following exception when updating the Project using maven.
java.lang.NoClassDefFoundError: org.eclipse.m2e.wtp.WTPProjectsUtil
at com.ibm.etools.maven.javaee.core.configurators.Utils.isJPAProject(Utils.java:43)
at com.ibm.etools.maven.javaee.core.configurators.JPAProjectConfiguratorDelegate.configureProject(JPAProjectConfiguratorDelegate.java:46)
at com.ibm.etools.maven.javaee.core.configurators.JPAProjectConfigurator.configure(JPAProjectConfigurator.java:45)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:472)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:465)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:403)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:316)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1301)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:313)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
However when I look in the plugins directory I can see the jar file org.eclipse.m2e.wtp_1.0.0.20130613-0136.jar which contains the class in question. How do I work out what the eclipse classpath is and is there a way to add this library to the classpath?
This answer is a temporary fix / hack.
Same problem for me since WDT upgrade :
"Web Development Tools" version 8.5.1002.v20130402_2058
with "m2e-wtp" version 1.0.0.20130613-0136
Root cause : Versioning rules for plugins dependencies
Solution :
Open file eclipse\plugins\com.ibm.etools.maven.javaee.core_1.0.0.v20121205_2240.jar
Edit META-INF\MANIFEST.MF
Change in Require-Bundle section
org.eclipse.m2e.wtp;bundle-version="[0.16.0,1.0.0)"
By
org.eclipse.m2e.wtp;bundle-version="[0.16.0,2.0.0)"
Or something like that greater than 1.0.0.xx ... and without change number of characters in column
Save file, jar and restart Eclipse with -clean option.
m2e v1.0.0 and wdt 8.5.1 (not 002) were working fine, but com.ibm.etools.maven.javaee.core-xx.jar was not in this version ... so the only sustainable solution is a WDT update (dependencies range upgrade), perhaps in v8.5.1003.
It turned out that I was using the wrong version of Juno and should have been using Juno 4.2. Once that was installed along with Websphere 8.5.5 plugin I just needed to update the m2e WTP plugin to the latest 1.x.x plugin.
It took me a long time to figure out the issue. What I did to fix the issue was, I uninstall the maven juno integration plug in and install the other maven plug in(m2e-wtp) and that did the trick and I am back on my eclipse workspace without any issues. Hope this will help.

Issues installing Spring STS in Eclipse Juno

I'm on Windows 7 professional 64b and have just downloaded and installed Eclipse Juno 64b:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
I go to Help -> Eclipse Marketplace then search for Spring STS and choose STS for Eclipse Juno (3.8 + 4.2) at this point I get into a deadly loop of not found dependencies and it doesn't matter how many packages I deselect, it will always complain (see below).
I have also tried installing Eclipse for Java Developers instead of Java EE. I have also tried the 32b versions. Finally I have also tried installing from the Spring STS update site http://dist.springsource.com/release/TOOLS/update/e4.2/ and still no luck.
Can anyone advice what's the solution to this problem? maybe I should switch back to Indigo?
Cannot complete the install because one or more required items could not be found.
Software being installed: Spring IDE Spring Data Support 3.2.0.201303060654-RELEASE
(org.springframework.ide.eclipse.data.feature.feature.group 3.2.0.201303060654-RELEASE)
Missing requirement: Spring IDE Live Beans Graph 3.2.0.201303060654-RELEASE
(org.springframework.ide.eclipse.beans.ui.livegraph 3.2.0.201303060654-RELEASE) requires 'bundle org.eclipse.zest.core [1.0.0,2.0.0)' but it could not be found
Cannot satisfy dependency:
From: Spring IDE Spring Data Support 3.2.0.201303060654-RELEASE
(org.springframework.ide.eclipse.data.feature.feature.group 3.2.0.201303060654-RELEASE)
To: org.springframework.ide.eclipse.feature.feature.group 0.0.0
Cannot satisfy dependency:
From: Spring IDE Core (required) 3.2.0.201303060654-RELEASE (org.springframework.ide.eclipse.feature.feature.group 3.2.0.201303060654-RELEASE)
To: org.springframework.ide.eclipse.beans.ui.livegraph [3.2.0.201303060654-RELEASE]
Actually avoid the Eclipse download site altogether and get the Spring Tool Suite IDE directly from here: http://www.springsource.org/downloads/sts-ggts. Everything I needed worked smoothly and out of the box: importing Maven projects and running the applications using AspectJ/Spring. It also comes with the critically needed plugins e.g. EGit, m2e, AJDT and everything works perfectly.
I needed this for a new GUI project on top of Spring/Valkyrie RCP.

spring development - with or without eclipse + checking eclipse version

Several tutorials mention that you can download spring in a tarball
and install it on your computer but when I go to the springsource
site all I can see is that you can download Spring Tool Suite
which is an eclipse plugin. So my questions are:
What if I wanted to work from the command line or an IDE other than eclipse?
The packages are available for Juno 3.8.2 or Juno 3.4.2, but how can I find
out my eclipse version? I've downloaded the most frequently downloaded version
of eclipse which is the one for Java EE developers but when I click on the Help
-> About entry I get:
Version: Juno Service Release 2
Build id: 20130225-0426
which does not match the eclipse versions on the springsource site 3.8.2 or 3.4.2,
so how do I know which plugin I need?
Thanks.
You can find out your Eclipse version by going to Help -> About Eclipse...
In the dialog that pops up, you will see something like:
Version 4.2.2
or
Version 3.8.2
If you downloaded the most commonly downloaded version, then you most likely have 4.2.2. The "Juno" release actually has distributions built for both 3.8.x and 4.2.x (a little complicated and confusing, I know). So, you should be able to install the Juno version of STS and be fine no matter what which version of Juno Eclipse you have.
EDIT
Your question is not very clear. I thought you were asking about how to install STS, but maybe you are asking about whether or not Eclipse is necessary at all. The answer is that of course, Eclipse is not necessary for Spring development, but it really is the easiest way to develop your spring apps (disclaimer, I am on the STS dev team).
There is no single way to just "downlaod the SpringFramework" because the framework is really just a very large set of jar files and their dependencies. Any single project typically only requires a subset of them as well as requiring other third party dependencies. For this reason, most people prefer working with a build tool like gradle or maven.
Probably the easiest way to get started w/o STS is to clone one of the sample projects from github. A list of the templates are available here: http://dist.springsource.com/release/STS/help/descriptors-3.0.xml which is obvioulsy meant to be consumed from inside of STS. But, you can use the file to grab links to the various github projects.
The Springsource Tool Suite (STS) is not required for developing with Spring. If the question is how you would install the STS, that's actually very easy. In Eclipse 3.7 (Indigo) or 3.8, 4.2 (Juno), click on the Help menu and select Eclipse Marketplace. If its not in the inital screen, use the find box type spring and click go which should bring up the the STS with the version of eclipse it is for in the title. Click install and the correct version and its dependencies will be installed for you. Try to use the eclipse marketplace for all the plugins you install, if possible. It makes things much simpler

M2e is not visible in Eclipse

I'm trying to install m2e plugin to enable maven integration but it looks like plugin is not installed:
What I do:
Maven is already installed in the system and 'mvn --version' works
Help -> Install New Software -> Indigo->General Purpose Tools - m2e
Eclipse restart of course
There is no mention of Maven in eclipse. Not in Window->Preferences, not when creating new project. Nowhere.
Tried different plugin repositories, tried Eclipse Marketplace - nada.
When running Eclipse I get these errors:
org.eclipse.m2e.logback.configuration: SLF4J logger factory is not an instance of LoggerContext: org.slf4j.impl.SimpleLoggerFactory
2 [org.eclipse.jdt.internal.ui.text.JavaReconciler] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
Not sure what to do at this point.
Would be grateful for any help!
Leonty
I don't recall what it is called in Indigo. I recently updated to Juno and imported my plugins with no issue. Below is a full list of plugins that I have installed. I'd recommend you uninstall what you have, then search for "Maven Integration". Install that and any other related plugins you will need (i.e. SCM clients).
It is builtin with Indingo, no !?
(Or maybe Indigo WTP)
I am quite sure because I had to re-install Indigo WTP several times

Spring Eclipse Plugin update site

Can anyone point me to spring-eclipse plug-in update location so I can use spring from my Eclipse IDE?
None of the ones I found online are working!
Spring works fine without any special eclipse plugins. Spring have there own version of eclipse called STS (SpringSource Tool Suite) and you could use that. The installation instructions (pdf) for STS include instructions for installing the STS components into an existing Eclipse 3.5 installation.