I have smallish personal project consisting of the following Eclipse workspace.
+
+-MyApp // this is just a vanilla Java Application
+-MyWebApp // this Dynamic Java Web Application (Tomcat)
+-MyCommonStuff // these are common classes
// Ex. Database access code & business classes
This is all well and good when I’m running on eclipse coz I can use Eclipse build properties to make the two apps reference the common project.
I am now thinking of how to deploy my app to a linux server and I’m wondering how to do it.
Can eclipse be used to build appropriate targets which can then reference the common stuff when running in a live environment?
Or do I have to learn how to use builders like Ant or Maven.
Thanks
You just need to add the common projects to the build path of the webapp project and to add them as web library dependency.
In the properties of your webapp project, go to Java Build Path > Projects and select the the common projects from your workspace to add them to the build path. Then, in the Java EE Module Dependencies select the projects which needs to be exposed in the
WEB-INF/lib. That should be it.