- This topic has 5 replies, 2 voices, and was last updated 17 years, 1 month ago by Loyal Water.
-
AuthorPosts
-
Girish PanditParticipantHi,
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
Loyal WaterMemberGirish,
You can go to Project > Properties > Project References and add your Java Project as a reference there.
Girish PanditParticipantYes, 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.
Loyal WaterMemberHere is the clarification for your query:-
http://www.myeclipseide.com/documentation/quickstarts/earprojects/#dependent_projects
Girish PanditParticipantThanks 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. :):):):)
Loyal WaterMemberGirish,
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.
-
AuthorPosts