How to run two webprojects in Spring ToolSuite without conflicts?


I have two Spring-based web projects open in Spring ToolSuite that I need to be able to work on and debug in at the same time. However, I am running into difficulties.

Project A is a standard MVC website project, Project B is a webservices host that performs a lot of backend functions for Project A (and others).

Project B distributes a number of Model and Service classes that Project A consumes through Maven as artifact jars.

Project A runs on one instance of tomcat (actually STS TC Server) on port 8080. Project B runs on a second instance of tomcat (standalone tc6) on port 8083.

If I have Project B closed in STS, both projects run fine and everything works. However, if I have Project B open and try and start the tomcat instance that Project A runs on, I receive all sorts of exceptions concerning missing classes that would be found in the Maven artifact.

I need to be able to run and debug both projects at the same time ideally as we develop new services and clients but this is proving impossible due to the above problems.

We have tried making the Project B a required project of A, changing build-path properties to try and force those classes onto the buildpath for A and so on, but nothing has worked so far.

Does anyone have any experience of this sort of problem and a potential solution? One of the guys on the team has used two instances of Eclipse to work around the problem, but running two instances of Eclipse is slow and clunky and has it's own issues tbh so I would rather avoid this if possible and stick to one IDE instance for debugging.

Any suggestions gratefully received.


if it is a maven project you can start it up outside eclipse by

mvn tomcat:run

then you can connect to it with the debugger as a remote app if needed

This video can help you solving your question :)
By: admin