views:

905

answers:

4

I have an existing, fully functional Spring web application based on Spring 2.5.6 - developed using SpringSource Tool Suite 2.1.0.SR1.

Because I'd like to use REST I decided to upgrade to Spring 3.0.0.M4. After editing the dependencies in pom.xml and changing my code to reflect the API changes in Spring 3.0 I tried to publish my web app to a local server (SpringSource tc - a Tomcat derivate).

The result is an almost empty web app folder and therefore a non-functional app. The app's folder only contains WEB-INF/lib with all libraries required by the Maven dependencies.

After realising that something's broken, I created a new Spring MVC project (based on the default 2.5.6) and published it to the same server. No problems. I tried to adapt my project's files (.settings/*, .project, .classpath, .springBeans), but this didn't change anything.

I'm pretty lost right now. My guess is that STS doesn't handle 3.0 apps correctly. Any suggestions?

PS: I don't want to revert to 2.5 if it's not absolutely necessary. I don't need STS and tc so I don't have a problem using other tools, but it worked fine so far.

A: 

Spring Tool Suite 2.1.0 claims partial support for Spring 3.0, though not for the REST features. According to the release, future releases will add full support. From the release statement:

Features

Support for milestones of Spring 3.0 including XML editing and validation, support for @Configuration and @Bean annotations

Future

Complete Spring 3.0 support including tools for developing RESTful web applications

Rich Seller
I don't think this is the cause for my problem. STS features shouldn't interfere with the pure ability to build and deploy an app. Right now I'm able to deploy succesfully using NetBeans. NB doesn't have support for Spring 3.0 either - but it works.
Koraktor
I see, what do you see in the log when attempting to deploy?
Rich Seller
Nothing special as far as I can tell. The maven build seems to work as usual (the resulting WAR contains all files), but deploying it to the server doesn't work.
Koraktor
A: 

Try deploying your app to embedded jetty. 'mvn jetty:run' with help you confirm if that there's nothing wrong with your build (that all the right manifests and deps are in place)

tunaranch
Deploying using NetBeans or Cargo (http://cargo.codehaus.org/Maven2+plugin) works without problems.
Koraktor
+1  A: 

I run into this all the time using Eclipse Galileo and m2eclipse 0.9.8 and Tomcat with WTP. I think it is m2eclipse that is the culprit. The problem seems worse after switching from Ganymede. The work around is to run mvn to create the war and then copy the war contents from "target" to WTP's "wtpwebapps" directory. You can conveniently find this horribly long path by double clicking the server in the Servers view, and choosing "Open Launch Configuration" from there click on Arguments(?) tab I think and copy the catalina.home java property that is defined as an argument there.

harschware
A: 

The problem vanished with newer versions of STS. Additionally my development environment changed a bit since I posted this question, so I can't really tell what caused the problem. For me, it looked like a weird hiccup inside STS.

Koraktor