facebook

Java Project as part of Enterprise Project

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

    Girish Pandit
    Participant

    Hi,

    I was wondering why “MyEclipse IDE” does not support to have a Java Project added in the deployment of EAR.

    look at the below application.xml,

    <application>
    <display-name>TestEar</display-name>
    <module id=”JavaClientModule_1198012527220″>
    <java>TestEarClient.jar</java>
    </module>
    <module id=”EjbModule_1198012527267″>
    <ejb>TestEarEJB.jar</ejb>
    </module>
    <module id=”ConnectorModule_1198012527298″>
    <connector>TestEarConnector.rar</connector>
    </module>
    <module id=”WebModule_1198012527345″>
    <web>
    <web-uri>TestEarWeb.war</web-uri>
    <context-root>TestEarWeb</context-root>
    </web>
    </module>
    </application>

    Above XML file was generated using Eclipse 3.3 WTP build. I was able to add and remove Java Projects from an Enterprise Application Project but on other hand MyEclipse IDE does not allow me to add Java Project even though I have couple of Java Projects open in the workspace. When I right click on EAR Project and go to MyEclipse–> Add Remove modules, it does not know if there is any Java Project in the workspace.

    Please suggest if I am missing anything.

    Thanks
    Girish

    #279824 Reply

    Loyal Water
    Member

    Girish,
    You can go to Project > Properties > Project References and add your Java Project as a reference there.

    #279829 Reply

    Girish Pandit
    Participant

    Yes, I can do that but it won’t be part of EAR deployment but it would be part of build. What I mean is when I add Java project as reference then it would be in the build but it will not update application.xml.

    Please correct me if I am wrong.

    #279837 Reply

    Loyal Water
    Member
    #279841 Reply

    Girish Pandit
    Participant

    Thanks Nipun for your response!!! and sorry for the confusion :):):)

    I think I should have been more clear…when I say how do I add Java Project Means “Java Project” and not either WEB or EJB project.

    in File-> Project-> you have different types of project, EAR, WEB, EJB, Web Service and you also have something called “Java Project” which is nothing but could be a stand alone application or a common API library that other modules would be using.

    In application.xml there is a setting which allows to have a Java Project as a part of EAR deployment

    <module id=”JavaClientModule_1198012527220″>
    <java>CommonAPI.jar</java>
    </module>

    now Application loader would look for this jar file and give it a preference.

    Whole point is to add Java Project along with Web and/or EJB projects.

    I think at this time I put my points. if there is still some confusion please let me know. :):):):)

    #279879 Reply

    Loyal Water
    Member

    Girish,
    I got your question. I figured out the project that you are trying to add as a module. MyEclipse does not support Java project being added as a module to an EAR project. But if you go ahead and add the project as a reference, the libraries (common API libs) in your java project will get deployed to the ear just like you want. The only thing that wont happen is that the Java project will not get registered in your application.xml file.

    Sorry for the confusion.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Java Project as part of Enterprise Project

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