I am trying to export a WAR file from Eclipse. I have a Dynamic Web Project. But I need classes created for two other projects, one simple Java project, the other another web project. So in Build Config, I told him to add other projects, and on the Order and Export page, I clicked on the boxes to export the second and third projects. In scripts that work perfectly in Eclipse, apparently, finding files from other projects without problems. But when I export, only files from the first project are included in the WAR file.
How to get Eclipse to include files of other projects in WAR? Apparently just adding them to the Build Config and labeling for export is not enough. Is there a problem because one of the other projects is also a web project? Does Eclipse make it go away?
I suppose I can do this job by copying the files I need from other projects into the first. But then, when they will be updated, I should know that this happened, and copy the new versions. That would be a pain, and I wondered what Eclipse projects were for, so I could share files between applications.
Edit
Let me clarify that I do not want to deploy 2 WAR. I have a web application written for one project that includes some classes that I want to reuse in another project. What I was trying to do was just take these couple of classes into a โrealโ WAR. I definitely don't want to deploy 2 WARs because this can happen on the same server as the original project, and I don't want to overwrite the existing WAR of the original project.
Thanks for any help!
source share