facebook

Make ME work with existing directory structure in CVS

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #217468 Reply

    forgotit
    Member

    Hi,
    ATM, we’ve got an existing ear project under CVS that looks something like this:
    root
    root>src> all da source files are in here

    <!– these are the xml files for the ear–>
    root>META-INF>ear.dir
    root>META-INF>ear.dir>application.xml
    root>META-INF>ear.dir>MANIFEST.MF

    <!– these are the xml files for a ejb jar file that will be included in ear–>
    root>META-INF>ejb.dir>ejb-jar.xml
    root>META-INF>ejb.dir>MANIFEST.MF
    root>META-INF>ejb.dir>weblogic-cmp-rdbms-jar.xml
    root>META-INF>ejb.dir>weblogic-ejb-jar.xml

    <!– lib directories–>
    root>lib>seven flavors of jars go here dat will end up in the ear

    Basically what we would like is to build a ejb jar file with all the sources under src and a few of the libs under the lib directory , and add this jar along with the rest of the jars in the lib directory to the ear and then deploy that to weblogic along with the manifest files for the ear. First off, I’m not too concerned with the deploy bit, what I really want is to debug my application in ME, the deployment via ME is necessary for debugging to work AFAIK.
    Now the problems:
    Problem 1:
    When I check out the project using CVS Repository view>check out as> J2EE > Enterprise app project and define an EJB project, what gets created is two seperate folder/project structures, one for the EAR project and one for the EJB project. The EJB project is linked into the CVS tree and CVS functions work. The EAR project, however, is created fresh by ME and is not linked into the CVS tree. What I would like is ME to recognise that, golly, there is an application.xml here in root>META-INF>ear.dir>, let me use that and allow me owner to sync with CVS.

    Problem 2:
    The EJB project does not like the xml files to be under
    root>META-INF>ejb.dir>
    It looks in vain @ root>META-INF> and sez, yo dude, you do not have deployment descriptors. Is there anyway to tell it, like, sonny look one directory deeper and thou shall discover all those missing deployment descriptors, and oh by the way, when you deploy them, bung them into the correct (META-INF) directory

    Failing all those possibilities, I wouldn’t mind having to do all the deployment, packaging etc via ant scripts (which are already there anyway via IDEA users who of course are looking all smug at this point) if there was a way to debug. Is there a generic ‘remote debug’ like in IDEA that can attach to an existing JVM and I can debug my EJBs.

    Phew, that was a very long post so I want to finish off by saying that its been a kickass tool this ME, and worth every penny I paid (cause its been helping me greatly a struts project that I’m also working on ) even if none of the above is possible. Thanks for all the fish.

    #217472 Reply

    Riyad Kalla
    Member

    forgotit,
    Actually if you launch the application server from MyEclipse, that is what hooks the debugger up to the application server (Window > Preferneces > MyEclipse > Application Servers), the deployment is just provided to be handy.

    Also remote debugging is supported via the default Eclipse debugger. You will be able to debug EJBs, Servlets and other Java classes but not JSP pages… those are handled by a custom source locater that is part of ME and it currently doesn’t support remote debugging.

    I am checking on problem1 and 2 for you though, they sound like good feedback to me.

    #217477 Reply

    Scott Anderson
    Participant

    RE: Problem 1:

    <!– these are the xml files for the ear–>
    root>META-INF>ear.dir
    root>META-INF>ear.dir>application.xml
    root>META-INF>ear.dir>MANIFEST.MF

    <!– these are the xml files for a ejb jar file that will be included in ear–>
    root>META-INF>ejb.dir>ejb-jar.xml
    root>META-INF>ejb.dir>MANIFEST.MF
    root>META-INF>ejb.dir>weblogic-cmp-rdbms-jar.xml
    root>META-INF>ejb.dir>weblogic-ejb-jar.xml

    Comingling an EAR and EJB project in the same Eclipse project isn’t supported because we cannot enforce the classloader hierarchy operations as required by the J2EE spec. Failing to do enforce the classloader operation would allow you to easily build applications that compile in the IDE, but wouldn’t deploy or run properly due to classloading errors. For that reason, our current project model mandates that you for your particular structure that you create EAR project and one EJB project, not one project that attempts to contain both.

    RE: Problem 2:

    It looks in vain @ root>META-INF> and sez, yo dude, you do not have deployment descriptors. Is there anyway to tell it, like, sonny look one directory deeper and thou shall discover all those missing deployment descriptors, and oh by the way, when you deploy them, bung them into the correct (META-INF) directory

    No, there is currently no way to do a custom configuration to force a mapping from an arbitrary directory into one of the spec-mandated directories for packaging. We’re looking at adding more flexibility to the project model in the future, but in the present release the deployment descriptors need to be located in the META-INF directory, as required by the spec, in order to be recognized.

    Failing all those possibilities, I wouldn’t mind having to do all the deployment, packaging etc via ant scripts (which are already there anyway via IDEA users who of course are looking all smug at this point)

    I don’t know why the’re smug since they had to write hundreds of lines of custom Ant script(s) to do something that MyEclipse would do for you automatically, if you used our projects to begin with. 😉 Seriously though, if you can’t change the project model and those IDEA guys have already written all the Ant for you, I’d suggest just checking out the project from CVS as a plain Java project, rather than one of our projects. You’ll have to use the Ant scripts for deployment, but as as long as you use one of our application server connectors to start your server, you’ll still have full debugging support. This seems like it will “get you there”, in the short term.

    Phew, that was a very long post so I want to finish off by saying that its been a kickass tool this ME, and worth every penny I paid (cause its been helping me greatly a struts project that I’m also working on ) even if none of the above is possible. Thanks for all the fish.

    Wow! And that’s from a guy in an IDEA shop where your company probably pays for your tools. Nice. 🙂

    #217516 Reply

    forgotit
    Member

    Guys,
    Once again thanks for the very quick replies. I’ve tried what you’ve suggested (checking out as a Java project) and debugging work beautifully. In fact, this is exactly what I was looking for as we write EJBs and deployment descriptors by hand (don’t ask 👿 ) and all I was looking for for the EJB project (although it is made up as a EAR because of Spring jar files) was to be able to debug in ME. I have a web project, which thankfully is set up as a seperate project in CVS, which I am using all the goodies of ME (including the recently reintroduced breakpoints on JSP tags) so I am doubly chuffed.

    Scott, my company pays for IDEA but I bought ME with my own money cause of one major reason: support. In terms of features IDEA and ME are about par anyway, but its in support where there’s a clear difference. I’ve been looking in these forums for a while now and you guys come up with solutions to problems in no time at all. Compare that with my email to IDEA support (and we are a large corporate with a fair number of IDEA licences) and the reply was along the lines of ‘if you are trying to do that, you are on you own mate.’ Right, back to the coding…

    #217524 Reply

    Riyad Kalla
    Member

    forgotit,
    Thank you for the support and we are glad that this worked out. I also appreciate the IDEA comments as it gives us some user-insight into our competition. JetBrains clearly has an amazing IDE, it is flattering to know that the two IDEs can be utilized to accomplish the same tasks… it means we are on the right path.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Make ME work with existing directory structure in CVS

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