- This topic has 10 replies, 4 voices, and was last updated 20 years, 7 months ago by support-michael.
-
AuthorPosts
-
xsunMemberI created a web project. I renamed my web-root folder to something other than “/WebRoot” by doing refactor. That was a few weeks ago. Everything works fine.
Now I am helping one of my teammates to setup her workspace. After I imported the web project I created, the compiler complains that web.xml can’t be found. I looked at Project > Properties > MyEclipse-Web > Web-root folder, it has “/WebRoot” in it, and it’s not editable. How can I rename it?
Thanks,
xsun
Riyad KallaMemberThere should be a file named “.mymetadata” in the project, make sure to use the Navigator view, or turn off .* filtering to see it. You can open this file and edit the value there.
xsunMemberI see. I will try that.
A general question: I have .project and .classpath file checked into source code control. Shall I check in .mymetadat and .mystrutsdata as well, so that my teammates and I share the same copy? What’s the good practice?Thanks,
xsun
Riyad KallaMemberxsun,
It depends on the team, if you are all using MyEclipse then it can’t hurt and would probably make setting up the project on everyone’s machine much easier. However if some of you are using JBuilder, and others NetBeans, and others IntelliJ… then it can be kind of messy.I *tend* not to ever check ANY project files into CVS so my repository keeps a ‘virgin’ copy of my projects, but my coworker uses JBuilder and it forces you to check your project file in… so it really depends.
xsunMemberOK, I see. Thank you.
BTW, the thing you suggested earlier worked.xsun
Riyad KallaMemberBTW, the thing you suggested earlier worked.
Oh good, I’m glad.
Lee T HallMemberI have a related problem so I’m adding it to this topic instead of starting a new one.
Our project uses a different name for “WebRoot”. When I first set up the MyEclipse J2EE web project using the correct name, everything works fine. Now I cannot find a “.mymetadata” in the project. I did not delete it.
As a result, the IDE is complaining about not having a web.xml and of the JSPs not being in the correct path. Reviewing the options dialog reveals that the context root is back to the default of “/” and that the document root was back to “WebRoot” instead of the correct setting.
I’m using Win XP pro and j2sdk1.4.2_04 with Eclipse 2.1.3 and MyEclipse 2.7.1… how can I restore the .mymetadata?
Lee T HallMemberIn frustration, I borrowed a .mymetadata from a different project and modified it as needed. The “project-module” ID was a bit of a concern, so I initially omitted it. MyEclipse didn’t pick it up until a value was supplied (just a random collection of letters worked).
If the symptom of losing the .mymetadata file repeats itself, this will be reported on a different thread.
support-michaelKeymasterThe most common reason for a missing .myeclipsedata file in your project is that the file is not shared through CVS. The process I recommend is to manually regenerate that file.
1) Create a new web-project with a name very similar to your primary project, e.g., MyProject1
2) Copy the .mymetadata file from MyProject1/.mymetadata to your primary project, MyProject/.mymetadata
3) Then edit the XML content of MyProject to reflect your project structure<?xml version="1.0" encoding="UTF-8"?> <project-module context-root="/MyProject" name="MyProject" archive="MyProject.war" type="WEB" id="myeclipse.1080887082021"> <attributes> <attribute name="webrootdir" value="WebRoot"/> </attributes> </project-module>
Please let us know if you experience further problems with the .mymedata file or its content.
Lee T HallMemberIs there any consequence / significance to the “id” attribute of the “project-module” element?
support-michaelKeymasterThe “id” attribute is used by MyEclipse as a unique identifier across all MyEclipse J2EE projects. You may assign it a value of anything as long as it is a proper XML ID attribute. That is is must start with an alpha-char, e.g., lethall-123, myeclipse.123455, x.
-
AuthorPosts