- This topic has 5 replies, 4 voices, and was last updated 15 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
bickMemberI am working on a plugin and I’d like the plugin to create MyEclipse projects programmatically. With general Eclipse, I’d create a Java project using:
... IProject eclipseProject = ... ... eclipseProject.create(...); ... IJavaProject javaProject = org.eclipse.jdt.core.JavaCore.create(eclipseProject);
Say I want to create a MyEclipse Web Project, or a MyEclipse Enterprise project. Is there a MyEclipse specific mechanism to do that? I assume that there is since there are MyEclipse-specific project files like:
.mymetadata
and a .myeclipse directory.
Thanks
Loyal WaterMemberMyEclipse has not exposed any public API to do this. Im afraid there is official way of doing this.
bickMember@support-nipun wrote:
MyEclipse has not exposed any public API to do this. Im afraid there is official way of doing this.
Is this something that is going to be addressed in the future?
Would you recommend that organizations not to try and “fudge” projects so that they are MyEclipse compatible?
Thanks Nipun
Scott AndersonParticipantbick,
While there aren’t any APIs you can use to directly construct MyEclipse projects, they are basically Eclipse projects with a specific structure and some meta-data. I believe if you create an example project, using our wizards, of each project you’re interested in you can see how you could pretty easily create projects that look effectively the same in all aspects by using the standard Eclipse project creation mechanisms and then some metadata files using XML generation/substitution.
bickMember@support-scott wrote:
bick,
While there aren’t any APIs you can use to directly construct MyEclipse projects, they are basically Eclipse projects with a specific structure and some meta-data. I believe if you create an example project, using our wizards, of each project you’re interested in you can see how you could pretty easily create projects that look effectively the same in all aspects by using the standard Eclipse project creation mechanisms and then some metadata files using XML generation/substitution.
I have created a MyEclipse Web project by hand however the .myeclipse\build directory is not created. Also, when I deploy the Web app to WebSphere, the installWebModule.jacl script is never executed so it looks to WebSphere that the application is not deployed. It does explode the EAR to the WebSphere deployment area which is good… but I’m not sure why it does not invoke installWebModule.jacl.
Do you know why deploying/redeploying a WebSphere application would not invoke the that JACL script?
One of the biggest issues I have is that there is very little logging in MEB, so it is nearly impossible to figure out why it is not running the JACL script.
Any help would be much appreciated.
Thanks.
Riyad KallaMemberbick,
Following Scott’s suggestion of looking through our .project and .classpath contributions will give you a good idea of the contents in that file, .mymetadata is really straight forward, the .myeclipse directory has some configuration information from time to time if you are using a feature that requires storage of more specific metadata (like project enhancement of RAD projects).
Given all that you should be fine “fudging” those project types by assembling them yourself — atleast for a basic web project it’s really straight forward what MyEclipse wants in it’s dot files. For addition capabilities like struts and hibernate, be sure to check the .project contributions and any addition dot-files we might create.
As for the JACL script, it’s only executed when Blue deploys a project to WebSphere via one of the MyEclipse Blue WebSphere connectors — if you are using different connectors or a custom location deployment, JACL won’t get run.
I don’t know if that helps?
-
AuthorPosts