facebook

Building EJB out of class files [Closed]

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

    Hello support team,

    how can I build an EJB if I do not have the source but only class files? The EJB project will have a src where I can put the meta info, but every class file there are ignored and not copied into the classes directory. Locating them directly into classes does not work (obviously) either. So is there another possibility for the EJB builder to grab prebuild class files?

    Regards,
    Jörg

    (Running Eclipse 2.1.1; MyEclipse 2.6.2; JDK 1.4.2; Win XP)

    #198683 Reply

    support-michael
    Keymaster

    A MyEclipse EJB project is an extended Java project that request src in order to support the development workflow. I afraid you will not be able to use an EJB project for this purpose.

    Michael
    MyEclipse Support

    #198685 Reply

    … hmmm. Not really satisfied 😉

    If I setup this EJB jar as simple project and build the archive with an ant script, can I use the project dependency of the EAR project to have the resulting jar included in the ear ?

    Regards,
    Jörg

    #198696 Reply

    Scott Anderson
    Participant

    Jorg,

    The easiest thing to do if you only have .class files is to create the EJB jar using Ant and then add it to the top level of the EAR project as a contained library. When you do this the deployer should add it to the EAR or to the exploded directory, depending on your deployment configuration.

    –Scott
    MyEclipse Support

    #198702 Reply

    Just for the records: I was able to solve the problem by inserting an Ant Builder after the Java Builder and before the DeploymentDescriptorValidator, that copies my precompiled class files into the classes folder. The projects stays a “valid” MyEclipse EJB Module and the standard mechanisms work as supposed for the deployment of the superior EAR project.

    Regards,
    Jörg

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Building EJB out of class files [Closed]

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