- This topic has 7 replies, 3 voices, and was last updated 21 years, 3 months ago by Scott Anderson.
-
AuthorPosts
-
rborgMemberI see there is planned Project Conversion Wizards for the 3.0 GA edition, but does anyone have any advice or experience converting a Lomboz 2.1 project into a MyEclipse project?
Scott AndersonParticipantBy now there should be quite a bit, judging from our download rate. Come on community, let’s chip in and pool our experiences on this one.
–Scott
MyEclipse Support
Eric GlassMemberThis is what I know, each of the Lomboz Web Modules and EJB Modules should be seperated into their own Java projects. For example I had a Java project (MyApp) with one Web Module (MyWeb) and one EJB Module (MyEJB):
MYECLIPSE SUPPORT NOTE: WHILE THIS LIST PROVIDES SOME VERY USEFUL INFORMATION, IT IS HIGHLY RECOMMENDED THAT YOU READ THE FOLLOW-ON POSTS IN THIS THREAD BEFORE BEGINNING A PROJECT CONVERSION –Scott
1) Create a new Java project called MyWeb to hold the Web Module.
2) Move the j2src folder and the folder that is labeled by Lomboz as (WEB CONTAINER) to this new Java project called MyWeb.
3) Right click on the MyWeb Java project and select the menu option MyEclipse -> Web Project Conversion…
4) On the Web Project Conversion dialog specify the folder that is labeled by Lomboz as (WEB CONTAINER) to be the Web Root Directory; specify your Web Context Root; uncheck the Create web.xml check box to use your existing web.xml file that was created by Lomboz; and click on the Finish button.
5) If you do not need the j2src folder for JSP debugging, then just delete it from the MyWeb project; otherwise open the MyWeb project properties and on the Properties dialog add the j2src to the Source folders on the build path on the Source tab; and specify a different output folder then what is being used by the projects src folder, because you do not want your JSP compiled Java classes going into your Web Modules web-inf/classes folder; and click on the OK button.
6) Rename you other Lomboz Java project from MyApp to MyEJB.
7) Add a folder to the MyEJB project called .myeclipse
8) Move all folders and source from the MyEJB project’s Java source folder (src) to the folder that is labeled by Lomboz as (EJB CONTAINER).
9) Open MyEJB project properties and on the Properties dialog remove the j2src folder from the Source folders on build path on the Source tab; and click on the OK button.
10) Delete the original Java source folder (src).
11) Rename the folder that is labeled by Lomboz as (EJB CONTAINER) to be the name of the original Java source folder (src).
12) Create a new temporary J2EE – EJB Module Project called TempEJB.
13) Copy the file .mymetadata from the TempEJB project to the MyEJB project.
14) Edit the .mymetadata file in the MyEJB project and change all references to TempEJB to MyEJB, like TempEJB.jar to MyEJB.jar.
15) Delete the TempEJB project and its contents on the file system.
16) Add to the MyEJB project’s .project file the following so that the <buildspec> and the <natures> sections look like the following:
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments></arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.j2eedt.core.ejbnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
17) Create a new J2EE – Enterprise Application Project called MyApp that connects the Web Module project MyWeb with the EJB Module project MyEJB.
Note: The icons for the projects MyWeb and MyEJB will be corrected the next time the projects are opened, so if you want you can close the projects and reopen them at any time.I hope that this helps.
Eric Glass
rborgMemberThanks! I’ll give this a try.
Scott AndersonParticipantEric, thanks for posting such a detailed list. While it certainly contains the steps necessary to “get you there”, I think I can add a few enhancements to it so that you won’t have to do any hand editing of descriptors, builders, or “dot” files.
I’d start by using our J2EE project wizard to create an EAR project with as many Web and EJB project needed tied to it. This gets all the meta data and builders configured correctly from the start. After you’ve done this, Eric’s instructions on moving your project code over are quite good. However, now you won’t have to do step 7 or 12-17. The difference is basically that if you start with the J2EE project, rather than ending with it, the process is a bit more straghtforward.
–Scott
MyEclipse Support
rborgMemberI actually had started along the path you outline … I have many EJB modules and one Web Module in Lomboz — I started with an EAR project in MyEclipse … but then stopped and posted the question.
I’ll combine the advice and give it a go and post back on the results.
Thanks again.
Eric GlassMemberScott,
Thanks for simplifying the process.
Also, I did not touch on how Lomboz recommends to debug JSP and how to convert that, because I feel that MyEclipse has the best way to debug JSP with the source.
If the Lomboz project is using the Sysdeo Tomcat plugin and the server.xml in the Tomcat conf folder has been modified to use the j2src folder for the JSP Java source folder, then this file can be changed, because with MyEclipse JSP debugging this is not needed.
Eric
Scott AndersonParticipantEric,
Good points on the server.xml file and JSP debugging. This thread is really shaping up! 🙂
–Scott
MyEclipse Support -
AuthorPosts