- This topic has 9 replies, 3 voices, and was last updated 18 years, 7 months ago by
tarantula.
-
AuthorPosts
-
Shahid MuhammadMemberI have the following eclipse projects for my applicaiton
- EnterPrise project (contains the application.xml - EJB Project - Web Project - Comman Project (Java project, refered by web and ejb projects)
When I deploy the project, everything is deployed except the Common Java Project. It’s description is not generated in applicationl.xml as java module.
How can I let myeclipse to deploy the java project within the ear and generate the java module in the application.xml?
Thanks
September 8, 2006 at 2:54 pm #258286
Shahid MuhammadMemberThe App Server is JBOSS 4.0.4
October 2, 2006 at 5:04 pm #259715
Riyad KallaMemberMuhammad,
What you need to do is mark the Common Project as a Java Project dependency of the EAR project (under the project properties) and you also need to setup the EAR deployment rules to JAR dependent projects and put them in the root of the EAR project.October 13, 2006 at 6:34 pm #260394
tarantulaParticipantI have the same problem (I’m using MyEclipse 5.0GA on Windows XP) and I’ve tried your solution.
It works (eg. MyEclipse JARs the referenced project and places it in the EAR file for deployment), but no Java module entry is added to application.xml. Additionally there is no way to add a Java module to the EAR file through the Add and Remove Modules… dialog (only Web and EJB).
Also, user libraries and other dependent JARs referenced by the Java module project are not added to the EAR file. The MyEclipse properties panel displays the following message when configuring the EAR project deployment policy in Window > Preferences > MyEclipse > J2EE > EAR Project:
Dependent Project Deployment –
Jar referenced Java projects and place in the archive at the
root level of the EAR. Module projects that depend upon the
referenced Java project should add a Class-Path: <jar filename>
entry to their MANIFEST.MF file.I have both checkboxes checked for “Library Deployment Policies” to include “Jars exported from dependent Java projects” and “User library jars exported from dependent Java projects” but MyEclipse does not add these to the EAR project.
How do you specify the MANIFEST.MF file for a plain Java project to be JAR’d by MyEclipse? Also, will this ensure that dependent JARs will also be added to the EAR file and configured as additional Java modules in EARProject/META-INF/application.xml?
Thanks
October 13, 2006 at 10:08 pm #260410
Riyad KallaMemberIt works (eg. MyEclipse JARs the referenced project and places it in the EAR file for deployment), but no Java module entry is added to application.xml. Additionally there is no way to add a Java module to the EAR file through the Add and Remove Modules… dialog (only Web and EJB).
That is OK, you just need to remember to regenerate the MANIFEST files for the projects so they get the correct Class-path entries to load the JAR classes. You can do that by right clicking on the EAR, go to MyEclipse and Regenerate Manifest Files. See if that fixes the issue.
October 14, 2006 at 5:06 pm #260420
tarantulaParticipantThanks, I will try this out.
I have another question. I noticed that Web module projects with a dot “.” in the project name are not packaged correctly by MyEclipse.
For example, if I have a Web project called “Web.Test” and I add it to an EAR project call “EARTest”, MyEclipse adds the following XML to EARTest/META-INF/application.xml:
<module id="myeclipse.12345..."> <web> <web-uri>Web.Test.war</web-uri> <context-root>/Web.Test</context-root> </web> </module>
This is fine, however, when the deployment is updated, the exploded Web.Test project is deployed as “$server_deploy_dir/EARTest.ear/Web.Test” and not “$server_deploy_dir/EARTest.ear/Web.Test.war” as would be expected by my application server.
Is this a bug?
October 16, 2006 at 12:09 am #260443
Riyad KallaMemberIt’s actually a horrible hidden feature that we added a long time ago as there was a strong demand from our users at the time for arbitarirly named deployment modules (.RAR, .SAR, .HAR and so on) so we implemented this hidden feature of sorts to honor archive names based off of the project names themselves.
It’s high on our todo list (I don’t know if it made 5.0.3) to remove it, and add a proper feature to the UI to control this.
December 20, 2006 at 6:21 pm #263709
tarantulaParticipantHello,
I’m still running into issues with the MyEclipse packaging and deployment features for Enterprise applications.
Can you please explain to me how this is supposed to work?
For example, I’m simply trying to deploy an EAR file containing one web application and one EJB module.
I would like the EJB module to be packaged as a JAR at the root of the exploded enterprise archive, and I would like the web application to be exploded at the root of the enterprise archive:
+ project.ear (expanded) + ejb-project.jar (packaged) + web-project.war (expanded)
Is this possible with your tool?
I have selected the option in the EAR module to package dependent Java projects as JAR files in the root of the EAR deployment, and then deployed the EAR file but MyEclipse insists on deploying the EJB module as an exploded archive.
The web application is correctly deployed as an exploded archive but the EJB project is not packaged as per the notes in the deployment settings.
I have tried adding a project reference from the EAR file to the EJB JAR and deploying the EAR but this does result in a packaged EJB module.
I have also tried adding the EJB module to the EAR file and deploying the EAR as an exploded archive but this also does not result in a packaged EJB module.
Can you help please?
Thanks,
IanDecember 20, 2006 at 8:28 pm #263719
Riyad KallaMemberIan,
The tool won’t deploy projects in different manners as you need, it will either deploy the whole thing as exploded or as packaged. The setting you were referring to is for dependent JAR (not EJB) projects that can be deployed at the root of the EAR, for a library or something similar that all the modules share.December 20, 2006 at 9:30 pm #263722
tarantulaParticipantOk, thanks for your reply.
-
AuthorPosts