I have a simple java project with this basic structure:
- IncludeMe
- src
- deploy
- siteSpecific
-> site1
-> site2
-> etc…
I also have another project which I check out as a Dynamic Web project.
I add it to a tomcat7 instance and run it locally on my machine.
- MainWebApp
- src
- deploy
- WebContent
-> resources
-> templates
-> etc…
What I need is to include the ‘siteSpecific’ folder from the ‘IncludeMe’ project under the ‘WebContent’ directory in the ‘MainWebApp’ project.
So if I make a change to files under ‘IncludeMe->siteSpecific’, they are automatically picked up and applied by my MainWebApp under ‘MainWebApp->siteSpecific’ i.e. I do bot want to have to manually copy the contents between the two separate projects.
I currently do the following with no luck:
– Open ‘properties’ of ‘IncludeMe’ and go to ‘Deployment Assembly’
– Select ‘Add’ and choose the ‘SiteSpecific’ folder.
– Source then reads ‘/siteSpecific’ and I adjust the deploy path to be ‘siteSpecific’
– Open ‘properties’ of ‘MainWebApp’ and go to ‘Java Build Path’
– Go to ‘projects’ tab and add the ‘IncludeMe’ project.
I’m using Eclipse Indigo 3.7 by the way.
Any help appreciated
Thanks
This is a bit hacky solution but the only one I found when I needed something like this.
The trick is to link external source folder and then use it in “deployment assembly”
Do the following:
After this dancing You should be able to see linked folder in “deployment assembly”…