使用 Eclipse 拒绝项目访问

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13525456/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:26:17  来源:igfitidea点击:

Project access denied using Eclipse

eclipsemaven-2

提问by Eugenio Laghi

I have a Maven project (made of 5 subprojects) I cloned from a Git Repository.

我有一个从 Git 存储库克隆的 Maven 项目(由 5 个子项目组成)。

When I compile (mvn clean install) them I get no errors, but, when I import them in Eclipse and try to Right Click > Maven > Update Project on the main one, I get error messages with (Access Denied) on every subproject (not on the main, which, btw is the parent folder with the subprojects' folders in it).

当我编译(mvn clean install)它们时,我没有得到任何错误,但是,当我在 Eclipse 中导入它们并尝试在主项目上右键单击 > Maven > 更新项目时,我在每个子项目上收到错误消息(拒绝访问)(不在主文件夹中,顺便说一句,它是包含子项目文件夹的父文件夹)。

I already checked the folder properties and gave full access on every directory and file for every user, I am actually modifying the files and developing the application, but I still get these error messages when I try to update the project.

我已经检查了文件夹属性并为每个用户授予了对每个目录和文件的完全访问权限,我实际上是在修改文件和开发应用程序,但是当我尝试更新项目时仍然收到这些错误消息。

Is there an obvious solution I am not seeing?

有没有我没有看到的明显解决方案?

On a side note: Also my coworker is having the same issue.

附带说明:我的同事也有同样的问题。

回答by Rolf Kunisch

I had the same problem on a Windows 8 64bit. The problem was that the file .classpathhad the hidden flag set. After I removed the hidden flag, everything was fine..

我在 Windows 8 64 位上遇到了同样的问题。问题是该文件.classpath设置了隐藏标志。在我移除隐藏标志后,一切都很好..

You just remove the .classpath and .project then continue the operations.

您只需删除 .classpath 和 .project 然后继续操作。

回答by Aaron Digulla

This can be caused by:

这可能是由以下原因引起的:

  • The project being on a network drive
  • Wrong permissions of the folder or any parent folder
  • A virus scanner preventing unknown executables from accessing the hard disk
  • 该项目在网络驱动器上
  • 文件夹或任何父文件夹的权限错误
  • 防止未知可执行文件访问硬盘的病毒扫描程序

To check whether it's a permission problem, create the project in the root of your hard disk and in your home directory.

要检查是否是权限问题,请在硬盘的根目录和主目录中创建项目。

To check whether it's a problem with the virus scanner, disable it.

要检查病毒扫描程序是否有问题,请将其禁用。

回答by Gaurav Shewale

In my(Windows 7 64 bit) case this caused by the

在我的(Windows 7 64 位)情况下,这是由

.classpathfile having the security block turned on.

.classpath打开安全块的文件。

Just right click on .classpathfile, select properties and unblock it.

只需右键单击.classpath文件,选择属性并取消阻止它。

回答by joan

I fix it by un-hiding the whole folder on \.eclipse.

我通过在 \.eclipse 上取消隐藏整个文件夹来修复它。

Select all folders, right click > Properties > Attributes - uncheck Hidden

选择所有文件夹,右键单击>属性>属性-取消选中隐藏

回答by Pravin

This was fixed by removing hidden flag from top folder of project through windows explorer.

这是通过 Windows 资源管理器从项目的顶部文件夹中删除隐藏标志来解决的。

回答by Gover Lyat

This can also be fixed by restarting the Eclipse.

这也可以通过重新启动 Eclipse 来解决。

回答by Debasish

Windows 10:

视窗 10:

C:\Users\<user_name>\should have .m2and .eclipsefolder.

C:\Users\<user_name>\应该有.m2.eclipse文件夹。

If they are hidden, right click and un-hide them. Apply the change in sub folder and files. This should solve the problem for me.

如果它们被隐藏,请右键单击并取消隐藏它们。应用子文件夹和文件中的更改。这应该为我解决问题。