facebook

Possible bug found: Smart depl. don’t work with WebProject

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    SteffN
    Member

    Hello,

    I have two dependent WebProjects webA and webB. In the project settings “Properties->MyEclipse-Web->Deployment” of project webA I checked “Use Smart deployment…”. webA has a dependency to webB configured in the “Java-Build-Path->Projects” tab. The src folder of webB is marked in “Order and Export”. After a whole redeployment of webA into a tomcat server, the webA doesn’t contain the classes of webB. Neither in the classes nor in the lib folder. This doesn’t work with any other option like “Jar depent projects and place in lib dir…”.

    After playing arround a little bit and makin WebProject webB to a normal JavaProject, everything works well but if webB is a MyEclipseIDE WebProject this doesn’t work! Is this a bug or why isn’t it allowed to deploy the sources of the dependent web project?

    Thank you.

    My environment:
    Eclipse 3.1.0
    MyEclipseIDE 4.0 M2
    Windows XP

    Regards
    Stephan

    #232471

    Riyad Kalla
    Member

    Stephan,
    This is not currently supported because there is no well defined way to “combine” web projects. If what you effectively want is 2 projects to share common base code, then you did the write thing, they should go into a base common java project. If you think of what it means to “combine” Web Projects you can see why we don’t do it automatically (should we just have one web.xml overwrite the other? how about same named JSP files? etc. etc.)

    #232518

    graemecox
    Member

    In the myeclipse manual this functionality is supported.
    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html
    (see section 10.1 Dependent Java Project Setup and Deployment Policy Configuration)

    I am having the same problem after following the instructions from section 10.1. My webappA is dependent on source code in webappB (webappB/src).

    All I want is the src class files from webappB to be included in a deployed webappA. No web.xml, strust-config.xml, etc. I only want class files from webappB/src. Not unreasonable and according to doc’s it should work.

    As per 10.1 instructions, I setup webappB as a dependent project for webappA. My source code in webappA successfully compiles as it finds my common javabean code in webappB. However, when I deploy webappA to tomcat4 the class files from webappB are not included in webappA/classes/. This causes webappA to fail to work as it cannot find class files.

    Am i missing something? There must be a way to share common source code between different project. It is impossible to build stable applications unless I can share common code between projects as the maintenance will be to much work.

    For example, I have a utility class in webappB that I want webappA to access. Having two copies of the same utility in webappA and webappB is not an option. Keeping the utility file upto date in both webapp’s will be extremely difficult. What about when this utility is shared by 10 separate webapps ?

    Other than this problem, using MyEclipse is a great timesaver and great development tool to have. I am glad I purchased the product.

    Please help,
    Thanks.
    Graeme.

    #232520

    Scott Anderson
    Participant

    No web.xml, strust-config.xml, etc. I only want class files from webappB/src. Not unreasonable and according to doc’s it should work.

    It will only work if the dependent project is a plain Java project, not another web project. From your statement, it appears to be a web project. If both web projects use a core set of java library code, I’d suggest refactoring the common code into a third plain Java project and have both web projects be dependent on it. That will work fine.

    #232521

    Riyad Kalla
    Member

    Graeme,
    We are pretty clear in the docs that it can only be a Java Project, we never state that a Web Project can rely on another Web Project, and as far as why we don’t support it, re-read my post above. While it would help you in your one single use case, it would likely confuse the heck out of a lot of people that all the suddent were getting smashed together deployments of unrelated projects that no longer ran because the web.xml file and other web app artifacts were all screwed up in the deployement result.

    Am i missing something? There must be a way to share common source code between different project. It is impossible to build stable applications unless I can share common code between projects as the maintenance will be to much work.

    Just follow what has been said (with the Java project that is shared) and you should be good to go.

    #232523

    graemecox
    Member

    Thanks for the replies. I will setup a plain java project for shared code.
    I was trying to do this with two separate webapp’s and it is clear to me that this approach will not work.
    Cheerz.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Possible bug found: Smart depl. don’t work with WebProject

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