facebook

[Closed] Customizing Webapp deployment

💡
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 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #263074 Reply

    advestigo
    Member

    Hi,

    I’m trying to customize the deployment of our webapp, which consists of 13 different Eclipse projects (one of them being the webapp project, the other 12 being pure Java projects).

    Here are the problems I’m encountering:
    1) while I need to copy most of the JARs in the dependent project’s lib directories, I need to be able to exclude a few (for instance because they conflict with those included in Tomcat, or because, in some cases we have different versions of the same library, in different projects – because our projects are shared between different products)
    2) I need to be able to exclude parts of the sources hierarchy (the src/test/java and src/test/resources folders, which are declared as source folders in Eclipse projects but only contain Unit-testing related files).

    In NetBeans (for instance), you can fully customize what gets included in the deployment. Why not in myEclipse? And how can I work around this limitation?
    For libraries, I know I can disable automatic copying of JARs, but then how can I automate their deployment?

    Thanks,
    David

    #263088

    Scott Anderson
    Participant

    David,

    Great questions. I think I can help out.

    1) while I need to copy most of the JARs in the dependent project’s lib directories, I need to be able to exclude a few

    The policies for deploying dependent Java project are quite flexible and can be controlled at the workspace level or at the project level. Information on how it works is in the Advanced section of the Working with Web Projects quickstart. You can set the policies on which libs from the dependent projects are included and which are not.

    2) I need to be able to exclude parts of the sources hierarchy

    For MyEclipse 5.1.0, there isn’t curreently a way to exlude portions of source hierarchies from deployment in a project. It’s a feature that just didn’t get finished within the 5.1.0 timeframe, but is scheduled to go into the next MyEclipse release. Sorry for the delay and inconvenience that causes; we’ll get it taken care of soon. However, while I realize that it’s not optimal, does deploying the test code and resources cause a problem while you’re developing and debugging? Naturally, you don’t want to do that for production, but for development I wouldn’t think it would actually cause an issue.

    #263092

    advestigo
    Member

    Scott,

    thanks for your reply.

    Regarding 1), it seems to be really an all-or-nothing approach (you either include all jars from a project, or none – you can’t choose which ones are included except by un-exporting from dependent projects). But I guess we can work around that.
    The other issue I have is that project-specific MyEclipse settings are not available when running myEclipse 5.1GA with Eclipse 3.2.0 (and, if you need to know, I cannot run Eclipse 3.2.1 because it is incompatible with Windows Vista…)

    2) is actually more important for us, because we have resources with the same name but different contents in src/main/resources and src/test/resources folders, such as log4j.properties or XXXBeans.xml bean configuration files, so that the behavior can be different between normal execution and test execution.

    We’ll look forward to 5.2 then…

    Best,

    David.

    #263097

    Scott Anderson
    Participant

    David,

    thanks for your reply.

    No problem, that’s what we’re here for. 🙂

    Regarding 1), it seems to be really an all-or-nothing approach (you either include all jars from a project, or none – you can’t choose which ones are included except by un-exporting from dependent projects). But I guess we can work around that.

    Ah yes, I see what you’re after. You’re correct that currently it works off the “export” flag. The idea being that if it’s exported, it’s needed at deployment time for the web project and if it isn’t, it’s not needed by the web project. To get a finer granularity than this, it will have to be the next release. The only workaround I can think of is to break out the libraries you don’t want deployed into their own dependent Java project upon which the existing project depends. The deployer will then ignore the new project since the web project won’t directly depend on it.

    The other issue I have is that project-specific MyEclipse settings are not available when running myEclipse 5.1GA with Eclipse 3.2.0 (and, if you need to know, I cannot run Eclipse 3.2.1 because it is incompatible with Windows Vista…)

    That’s peculiar. We don’t know of an incompatibility there. Can you right-click on your web project in the Package Explorer view and select Properties > MyEclipse > Web and a screenshot to ‘support at myeclipseide.com’ with a link to the thread? That dialog page should have a ‘Deployment’ tab as the third tab that allows you to customize the settings, even on Eclipse 3.2.1.

    2) is actually more important for us,

    That makes a lot of sense. I just rechecked and the PR is targeted for resolution in this development cycle, so I’ll add this thread to it to ensure your usage scenarios are covered.

    #263098

    advestigo
    Member

    Thanks.

    Actually, under Eclipse 3.2.0, I don’t have a “MyEclipse” section in the project’s Properties dialog box… But I do have it on my Eclipse 3.2.1 deployment (which crashes too often to be useable on vista).

    David.

    #263100

    advestigo
    Member

    Oh, and a suggestion for a simple implementation of my feature request #2:
    One should be able to specify that the webapp Deployer copy build output only from the default output folder for all projects. Thus, if I wanted to isolate my “normal” code and resources from my “test” code and resources, all I’d have to do is specify a non-default output folder for test code and resources (in Properties/Java Build Path/Source).
    Right now, even if I select a non-default folder as the output of a source folder, that output folder’s contents get copied over to WEB-INF/classes.

    David.

    #263135

    Scott Anderson
    Participant

    David,

    Good ideas. Thanks.

    Actually, under Eclipse 3.2.0, I don’t have a “MyEclipse” section in the project’s Properties dialog box… But I do have it on my Eclipse 3.2.1

    Then that’s caused by MyEclipse 5.1 being built specifically for Eclipse 3.2.1. For Eclipse 3.2.0, the compatible version is MyEclipse 5.0.1.

    #263145

    advestigo
    Member

    Then you should probably fix the documentation and the web site, which currently announce compatiblity with Eclipse 3.2.x (and 3.2.0 explicitly in at least one place).

    In any case, I’ll try out 5.1GA with the current dev build of 3.2.2 (which fixes Vista-related issues) and let you know if that works.

    Thx,

    David.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: [Closed] Customizing Webapp deployment

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