WebApp won’t compile in CentOS 7 server, but does compile in Windows

I am getting a “resource marked as read-only” error when I try to compile a war file on a CentOS 7 installation. But the same eclipse project does not throw any compilation error on Windows after I zip the project up, transfer it to windows, and then import it into eclipse in windows. I have tried changing file permissions, but the compilation error remains. How can I resolve this error so that the war file can compile on my CentOS 7 server?

The very first line of the pom.xml in an eclipse spring mvc maven project is showing the following compilation error:

Parent of resource: /path/to/myworkspace/MinimalDbaseExample/target/m2e-wtp is marked as read-only.  

This error showed up after I navigated the terminal to the root folder of the directory and typed mvn clean install.

I have uploaded a zipped copy of the sample project to a file sharing site. You can download the zipped project from this link in order to reproduce the error on your machine in a minute or two.

Note: I read this other posting, and then tried the following from the CentOS terminal:

chmod -R ugo+rw /path/to/myworkspace/MinimalDbaseExample/target/

And I also tried:

chmod -R 0777 /path/to/myworkspace/MinimalDbaseExample

But eclipse is still showing the compilation error, even after multiple Project clean and Maven update operations. I thus assumed it was not an OS problem, but then I switched to windows, downloaded the zip from the link above, imported it into eclipse in windows, and did Run As...Run on Server. The project did not show the compilation error in windows. Is there something else I can do in CentOS 7 to fix this?

How can I resolve this error?

Answer

Attribution
Source : Link , Question Author : CodeMed , Answer Author : Community

Leave a Comment