facebook

ME4.0M2 on E3.1 doesn’t deploy indirectly dependent JARs

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #232232 Reply

    ggerard
    Member

    The original title was the following but was cut off by the BBS:
    ME4.0M2 on E3.1 doesn’t deploy indirectly dependent JARs or classes

    I have project A, B, C, D, E

    A: configuration Java code and properties files
    B: logging layer (log4j is a library in this project; exports A and log4j JAR)
    C: service layer (no libraries in this case)
    D: service-test (execises service as any other project would; dependent upon service explicityly (project properties))
    E: web layer (dependent upon service explicitly (project properties))

    Eclipse does what I expect it to do. From the service-test project, I can consume anything exported by my dependent projects (which would include anything that’s exported to them). So, from the service-test project, I’m able to access and muck with log4j which is 2 project “hops” away from me.

    I have the same thing setup for the web project. While Eclipse/MyEclipse allows me to import org.apache.log4j.*; without any red underlines or problems, it won’t deploy the JAR for me.

    Unless I explicitly subscribe to all dependent projects, I don’t get the expected behavior of log4j ending up in the deployed WEB-INF/lib directory.

    I expect this to work for three reasons. First, Eclipse didn’t complain when it had the opportunity to. That is, no errors were highlighted in the project but the deployment fails to run. Second, this breaks encapsulation. I must know all the sub-dependencies of all my projects. We’re breaking out a monolithic project into smaller sub-projects to avoid spreading knowledge around. Third, when I right-click the service-test project and export an ANT file, it recurses through all my directly and indirectly dependent projects and produces the right build scripts. This was just added to 3.1, incorporated from the eclipse2ant project which recursed through the projects to create all the files.

    Would love to know if this is a config bug on my part. Even asked MEI forums and got a response which validated my steps so I’m not sure of that any more. Would love to see this fixed. Already we’re having problems as we’re moving projects around (developers don’t know all the tendrils so the web project is now has everthing checked including things that shouldn’t be resulting in lots of non-fun to chase down). Would love to see this fixed for 4.0 final or a fast follow on patch.

    Thanks!
    greg

    Now in the E3.1 distribution but here for reference:
    http://www.geocities.com/richard_hoefter/eclipse2ant/

    #232247 Reply

    Scott Anderson
    Participant

    Greg,

    Unless I explicitly subscribe to all dependent projects, I don’t get the expected behavior of log4j ending up in the deployed WEB-INF/lib directory.

    Yes, that is actually precisely as designed, as explained below.

    [quote]
    Second, this breaks encapsulation. I must know all the sub-dependencies of all my projects.
    [quote]
    You’re correct, but you’re confusing design-time concerns with deployment-time concerns. For example, if you had this same project setup without MyEclipse installed and wanted to export an executable Jar, you’d still have to use Eclipse’s export wizard to pick and choose what project files / library jars you want and which you don’t.

    The issue is that in deployment, we don’t know what facilities are available in the particular server you selected and which are not. For example, some servers export log4j for applications to use, and some do not. You might have included server-specific, or framework libraries to compile against, but they don’t need to be deployed, etc. What the problem degenerates into is the need for a facility to individuall pick and choose what files / libraries are needed for a web project’s deployment, because while “all” might work for your particular case, it surely won’t work for many others.

    As a result, we’ve made the deployer very precise in that it only looks for direct dependencies, by design, and in those it will only take libraries that you’ve explicitly exported on the build path. This provides you the functionality to pick and choose which libraries you want to use, and by associating the projects directly with the web project you’ve specifically stated that they should be considered for deployment.

    In the end, we can deploy you’re application, but require that projectets B, C, D, and E be set up as directly dependent to your web project, as you’ve discovered.

    Would love to know if this is a config bug on my part.

    It doesn’t sound like it is at all. It just sounds like you’ve found that our deployer only considers directly dependent projects, for the reasons suggested above.

    Would love to see this fixed.

    Now that we can support Eclpse 3.1-only, we’re going to be enhancing our deployer in coming releases and expect to have a more flexible arrangement, that will support what you really want, in the MyEclipse 5.0 timeframe in the fourth quarter.

    In the interim, thanks for working around the issue by directly referencing your subprojects from your web project.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: ME4.0M2 on E3.1 doesn’t deploy indirectly dependent JARs

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