facebook

Deploying multiple projects to the same WAR

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #250606 Reply

    Ido Carmel
    Member

    Is it possible to deploy the contents of several projects into one WAR? Here’s my situation:

    I’m working on a source tree that is divided into several sub projects, each with its own src and webroot (where all the JSP and HTML files live). In deployment, all classes and webroots get merged by an Ant script into one big war directory in the app server’s (JBoss in this case) deploy directory.

    I’m trying to get MyEclipse to handle the deployment. I created a new web project that depeneds on all the other projects in the workspace and set up deployment for the new web project. This caused all the classed to be deployed to the WAR, just as I wanted. The web contents is more complex. I couldn’t find a way to “import” resources (JSP and HTML files) from the other projects, so I had to create a complex tree of directories and links (file systems links, not Eclipse links) to the JSP directories in other projects.

    This setup actually works, in the sense that everything gets deployed to the right place, but there are several problems that make it unusable:
    1. The link-based structure is difficult to create and very fragile. It breaks when other developers add or remove directories to the “real” source tree.

    2. Eclipse shows every non-Java file twice – once in the original project containing it, and once in the web project that has a link pointing to its directory. This confuses Eclipse – when I edit a file in its real location (in one of the Java projects), the web project doesn’t notice that the file changed until I refresh it. This kind of defeats the whole purpose of white I’m trying to do…

    3. Source control plugins become completely confused by this virtual directory structure.

    So, my questions is this: is there a simple way to get MyEclipse to take all the JSP/HTML files form all projects and deploy them to a single WAR? We have 100 developers working on the product with 15,000 files, so combining it all into one big project is not an option. I can, however, make some structural changes to the projects, if I need to.

    Thank you!

    #250626 Reply

    Riyad Kalla
    Member

    Is it possible to deploy the contents of several projects into one WAR? Here’s my situation:

    Yes as long as they are Java Projects.

    I’m working on a source tree that is divided into several sub projects, each with its own src and webroot (where all the JSP and HTML files live). In deployment, all classes and webroots get merged by an Ant script into one big war directory in the app server’s (JBoss in this case) deploy directory.

    Ahh, no MyEclipse won’t support this. There is no rule for merging web projects (for example, two projects have a web.xml file, which one do you use?). We’ve talked about the possibility of adding an “overwrite” option in the past where you just smash the two together, but we’ve never liked that solution much.

    So, my questions is this: is there a simple way to get MyEclipse to take all the JSP/HTML files form all projects and deploy them to a single WAR? We have 100 developers working on the product with 15,000 files, so combining it all into one big project is not an option. I can, however, make some structural changes to the projects, if I need to.

    Wow that sounds sizeable. Well for MyEclipse to help if the dependent projects were all Java Projects then it could deploy them as modules of the Web Project. Although keep in mind that is ONLY class files and source directories, it won’t touch your JSP/HTML files in the WebRoots of those other projects.

    Given the size/complexity of the project, you might be better off with that Ant script for now. I know we are doing some big enhancements to project layout in MyEclipse 5.0 and the first snapshot of that work should be in MyEclipse 5.0 Milestone 2 (not in M1 due out soon) so you could hvae a look and see if those enhancements helped you. And if they didn’t please let us know what kind of functionality you would need.

    #250675 Reply

    Ido Carmel
    Member

    I was afraid that would be your reply 🙂

    Do you have any details (that you can share 🙂 on the project layout changes that are coming in 5.0? I’ve read in some places that Eclipse 3.2 will give me the ability to hide resources from the IDE by creating a sort of link to nowere, but I’ve also read that this capability will not be exposed to the user. Do you know anything about this feature?

    This sort of feature, combined with the deep links in 3.2M4 make my life a bit easier.

    Thanks,
    iDoc

    #250677 Reply

    Riyad Kalla
    Member

    Do you have any details (that you can share 🙂 on the project layout changes that are coming in 5.0? I’ve read in some places that Eclipse 3.2 will give me the ability to hide resources from the IDE by creating a sort of link to nowere, but I’ve also read that this capability will not be exposed to the user. Do you know anything about this feature?

    Sorry I”m not farmiliar with a hiding feature, but we are aware of the “linked resources to anywhere” that was added, which I think is what you are referring to, meaning you can build out the structure of your project by directories and files that actually exist in complete disconnected physical locations on the drive.

    As far as the project flexibility it’s not a secret, it’s the flexiproject support that is in WTP 1.5 right now. We helped write the original spec for that and contributed to the WTP team to implement as the platform for ALL wtp-based IDEs to build on, so we would all be on the same playing field and IDE developers could spend time creating good tools and stop wasting time creating import/export wizards that read between different IDEs.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Deploying multiple projects to the same WAR

You must be logged in to post in the forum log in