facebook

Problem with deploying dependent web projects

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #222330 Reply

    alexmcbeth
    Member

    Hello,

    I am having some problems when deploying dependent web projects. I have created 2 web projects, ProjectA and ProjectB, with Project B being dependent on ProjectA. I cannot get the output of ProjectA to be deployed with ProjectB. I have tried both Smart development and Always jar dependent projects, both to no avail.

    The only way I can workaround this at the moment is to export ProjectA as a jar file and manually add this external Jar to ProjectB. This is a bit of pain as I have to remember to re-Jar every time I change some code in ProjectA.

    I have simplified our problem down to this ProjectA/ProjectB test case and cannot this working correctly.

    Am I doing something fundamentally wrong here?

    Test Case

    Operating System – Windows XP
    Eclipse version – Version: 3.0.1 Build id: 200409161125
    MyEclipse version – Version: 3.8.1+QF20040825 Build id: 200408201200-3.8.1+QF20040825
    JDK – j2re1.4.2_03

    Steps to recreate.

    [1] Window -> Preferences -> MyEclipse -> J2EE Project -> Web Project Deployment

    a) Set Web Project Build Path Policy to Yes, automatically add WEB-INF/lib to Web Project Build Paths

    b) Set Web Project Dependent Project Deployment Policy to Use Smart deployment for dependent Java Projects

    c) Set Web Project External Libraries Deployment Policy to Always deploy external libraries and place in the ‘lib’ directory when deploying

    [2] New -> Web Project

    a) Set Project Name to ProjectA

    b) Untick the Use Default Location

    c) Set the Directory to c:\devel\workspace\ProjectA

    d) Leave Source folder set to src

    e) Leave Web root folder set to website

    f) The context root is filled in as /ProjectA

    [3] ProjectA -> Properties -> MyEclipse-Web

    a) Set Web Project Dependent Project Deployment Policy to Use workbench default value

    b) Set Web Project External Libraries Deployment Policy to Use workbench default value

    [4] ProjectA

    a) Create Nothing.java in ProjectA/src

    [5] New -> Web Project

    a) Set Project Name to ProjectB

    b) Untick the Use Default Location

    c) Set the Directory to c:\devel\workspace\ProjectB

    d) Leave Source folder set to src

    e) Leave Web root folder set to website

    f) The context root is filled in as /ProjectB

    [6] ProjectB -> Properties -> MyEclipse-Web

    a) Set Web Project Dependent Project Deployment Policy to Use workbench default value

    b) Set Web Project External Libraries Deployment Policy to Use workbench default value

    [7] ProjectB -> Properties -> Java Build Path

    a) In Required projects tick ProjectA

    b) In Order And Export ensure ProjectA/src is ticked

    [8] ProjectB -> Properties -> Project References

    a) Tick ProjectA

    [9] Deploy ProjectA followed by ProjectB using Tomcat 5 server.

    c:\tomcat\webapps\ProjectB\WEB-INF\classes is empty – I believe this should contain Nothing.Class

    c:\tomcat\webapps\ProjectB\WEB-INF\lib is also empty when I choose to Jar dependent projects.

    #222340 Reply

    Greg
    Member

    The Jar dependent project looks for dependent java projects not other Web projects. Try putting your dependent classes in a seperate java project, and then add this project to the classpath of both projectA and projectB. Then right-click the projectA& B and on the MyEclipse-Web > Deployment page, select “Jar Dependent Projects …”.

    #222454 Reply

    alexmcbeth
    Member

    Is this something that may be implemented in the future. I would have thought that having a dependent web project would just bundle up the java classes included with the web project, and not all the jsps etc.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Problem with deploying dependent web projects

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