facebook

EJB Project automatically added to all Web and EAR projects

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #262016 Reply

    jarethk
    Member

    I have a list of EJB projects I typically leave as Closed because they aren’t being actively developed. They’re set up in Eclipse because I need to have them deployed, but after that I don’t need them open.

    My problem is that if I have to reopen one of these EJB projects, MyEclipse is adding that EJB as a project reference to some Web and EAR projects that don’t and shouldn’t be referencing those EJBs. How can I stop MyEclipse from auto-adding these EJBs to projects?

    Eclipse 3.1.2
    MyEclipse 4.1.1

    — David Fuller

    #262045 Reply

    Riyad Kalla
    Member

    David,
    That’s the first time I’ve ever heard that… I’m not sure what is going on, it’s possible that some stray plugin state is causing this strangeness. Try this though:

    1) Open all your projects, close all your editors
    2) Restart MyEclipse using the -clean command line argument
    3) Adjust all project references to make sure they are all correct.
    4) Restart again using -clean
    5) Check the references, are they still correct?
    6) Close the projects you don’t need

    I’m basically trying to blow out any old state cache that would be mucking this up.

    #262055 Reply

    jarethk
    Member

    That didn’t seem to help any.

    What I was able to finally do was
    1. Close the EAR and Web projects the EJBs were being added to. Turns out it was 3 specific projects out of the dozen or so Web projects in my workspace.
    2. Open the EJB projects.
    3. Do what I needed to do on the EJB projects.
    4. Close the EJB projects.
    5. Re-open my EAR and Web projects.

    I’m going to try upgrading to Eclipse 3.2 / MyEclipse 5.1 to see if that helps.

    #262157 Reply

    Greg
    Member

    I just want to make sure of a couple of things.

    1) Are you sure that none of the EJB projects are listed as a “module” of any of the EARs? When you add an EJB project as a module of an EAR, it will get automatically added as a dependency to that EAR project. You can get the module list of an EAR by going to “MyEclipse > Add/Remove Modules…” from the context menu of an EAR Project.
    2) Sometimes code-assist within the Java Editor can auto-add another project on the classpath of an Web project for instance. This is not likely happening without your knownledge but it may be something to keep in mind.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: EJB Project automatically added to all Web and EAR projects

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