- This topic has 7 replies, 2 voices, and was last updated 17 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
Wouter BoersMemberHi,
I have a very simple test project created as a web project with the source folder set as src/main/java and the webroot folder set as src/main/webapp. (Maven2 like). The test application (a Tapesty 4 test project) work fine but I do not see the webapp in de MyEclipse J2EE view. So ik added the src/main/webapp as a source folder. By doing that, the deployment stopped working. The reason being that MyEclipse refused to copy the files in the webapp folder to the exploded war location. The conclusion I draw there is that MyEclipse deployment cannot handle multiple source folders. (Set via project properties -> build path). Is that true is is it because I selected the webapp folder as a source folder (where I don’t see any harm in). For me this is quite an issue so is it a but or feature (with reason?)
removing the webapp as source folder fixes the problem but then I’m bound to the resource view and I want other views, like jave and MyEclipse J2EE view.
Riyad KallaMemberCan you explain to me what you mean by not being able to see the project in Package Explorer? Maybe post a screenshot of the one view, then of the other one? All projects should be visible by all the project-viewing modes.
Wouter BoersMemberPackage explorer? I read back and do not see me mentioning that.
Further test show that MyEclipse cannot handle the situation when:
1. You create a normal WAR project with a webroot set to the webapp folder and sources in a src folder.
2. Deploy your webapp
3. Add the webapp folder to you Eclipse sources (right click project -> properties -> Java build -> Add webapp a source folder
4. Redeploy you webappYour application is gone. As well in tomcat as in Jetty the application is gone.
So what is left is the resource perspectiveinstead of the java perspective. Can you tell me why this is the case?
Regards, Wouter
Riyad KallaMemberWouter,
I may be misunderstanding your setup, but we had another user that reported having two source folders stopped his deployment from working. So I setup a web project that had two source folders… /src/java and /src/test and it deployed fine. I exported the project as an archive and sent it to him to test, I haven’t heard back yet.As far #3 goes above, yes this will break things because your output folder is implicitly WebRoot/WEB-INF/classes, so if you set WebRoot (or whatever name you gave it) as a source folder, you are effectively creating a source folder that has an output folder inside of it, which Eclipse won’t allow.
My guess as to why #4 is happening is because the undeployment step is done, then when MyEclipse goes to try and redeploy the app it is failing. So I better understand your use case, why are you trying to add your WebRoot folder as a source directory?
So what is left is the resource perspectiveinstead of the java perspective. Can you tell me why this is the case?
I don’t understand what you are asking/stating here. You can open the MyEclipse perspective from Window > Open Perspective > Other… > MyEclipse, same goes for the Java perspective. If this is not what you meant, please explain… are perspectives being closed on your automatically? I just didn’t follow what you meant.
Wouter BoersMember@support-rkalla wrote:
As far #3 goes above, yes this will break things because your output folder is implicitly WebRoot/WEB-INF/classes, so if you set WebRoot (or whatever name you gave it) as a source folder, you are effectively creating a source folder that has an output folder inside of it, which Eclipse won’t allow.
That’s what I figured. But you can add the WebRoot as a source folder and exclude the WEB-INF/classes folder. Eclipse does allow this.
@support-rkalla wrote:
My guess as to why #4 is happening is because the undeployment step is done, then when MyEclipse goes to try and redeploy the app it is failing. So I better understand your use case, why are you trying to add your WebRoot folder as a source directory?
Well the reason for that is rather simple. When I open the MyEclipse perspective to develop java code and also edit HTML/JSP files in the WebRoot folder which are of course stored in the WebRoot folder. I do not want to change perspectives all the time.
MyEclipse 4 and earlier was capable of this and I do not understand why this feature has been removed. As a web application developer you would like to have both the java files and the webroot files available in one perspective. There is no wat arround this?
Riyad KallaMemberThat’s what I figured. But you can add the WebRoot as a source folder and exclude the WEB-INF/classes folder. Eclipse does allow this.
If you move or remove the output folder, this breaks MyEclipse’s ability to deploy this project for you. If you are handling deployment in another manner this may not be important, but I just wanted to point that out. MYEclipse expects WEB-INF/classes to be there when deploying.
Well the reason for that is rather simple. When I open the MyEclipse perspective to develop java code and also edit HTML/JSP files in the WebRoot folder which are of course stored in the WebRoot folder. I do not want to change perspectives all the time.
I’m confused now… can you post a few screenshot of the exact problem? The reason I ask is because editors are perspective agnostic. I tend to edit all my files from my MyEclipse perspective (.java, .xml, .jsp, .html, .txt, .properties and so on) and rarely switch to other perspectives unless I need additional tools from those perspectives (like the Debug perspective for example). Additionally, I don’t see how the location of your source folder in any way effects what you can/can’t see in each perspective… so combining those two things I’m just not sure I understand the problem that you are running into and want to help.
Maybe just walk me through a few screenshots letting me know what is going on and I hope I can pinpoint what setting is wrong or maybe how to fix the issue.
Wouter BoersMemberRiyad, I been away for a while, please see check your PM’s. I’ve send you attachements with the problem.
Regards, Wouter
Riyad KallaMemberWouter,
First let me thank you for the excellent detailed report, that is a very strange problem and honestly looks like a plugin conflict or a bug. I notice you are using Maven and I saw some annotations on your project icons that make me think you have a Maven-specific plugin installed… I wonder if that could be conflicting.Just to do a quick sanity check, can you go to File > Export > Archive, and export the Web Project that has the hidden Web Root directory to a ZIP file, then go open the ZIp file mannally in Windows and look inside of it and see if it correctly contains the file it is suppose to? I’m wondering if MyEclipse just isn’t seeing this project correctly (bug or plugin conflict) or if sometihng wrong is happening and actually causing the project to mess up.
Also, could you try creating a new workspace (File > Switch Workspace > C:\tempworkspace) and then re-importing the project using the archive you created from the step above and see if MyEclipse sees the project correctly then?
-
AuthorPosts