I have a number of projects in Eclipse PDT which are all websites. All of these websites use a content management system that I developed. I moved the code for the CMS into a separate project ready to be shared.
So far I have a project/file structure similar to this:
CMS [CMS master]
-CMSlib
Website1
-scripts
-CMSlib
Website2
-scripts
-CMSlib
The CMS\CMSlib
folder contains the shared code and the CMS project itself is connected with a local Git repository and represents the latest version. I'm not sure how I should share this code between projects. If I am to share this code I must be able to retain the following workflow functionality:
- I must be able to test the websites on a web server. I have WAMP
installed for this purpose. Adding the
CMS
project to each website project's include path in Eclipse is no good as a web server has no knowledge of eclipse. So I need the files to be present locally (ideally within thescripts\CMSlib
folder within each website project). - The code for the CMS must be easy to update for all websites. So if I add
a feature to the
CMS
project it should be easy to update the CMS code for each website project.
So what is the best practice when these requirements are needed? Is there some way of pulling files from the repository into other projects with EGit (I am a Git beginner by the way)? Or am I missing some other setting that allows this to be done using the include path?
Note: Copying and pasting CMS\CMSlib
into a website project's scripts
folder comes up with an option box forcing me to skip the operation if the folder scripts\CMSlib
already exists.