简体   繁体   English

Eclipse Maven:没有“从 SCM 签出 Maven 项目”选项

[英]Eclipse Maven: no "Checkout Maven project from SCM" option

I have to compile and run a Maven project that some colleagues of mine developed some years ago.我必须编译并运行我的一些同事几年前开发的 Maven 项目。 I'm using Eclipse Helios on Microsoft Windows Server 2008.我在 Microsoft Windows Server 2008 上使用 Eclipse Helios。

In their documentation about how to compile it with Eclipse, I read that I have to install on my Eclipse:在他们关于如何使用 Eclipse 编译它的文档中,我读到我必须在我的 Eclipse 上安装:

After installed these plugins, their document says to select the option "Checkout Maven Project from SCM" and other operations.安装这些插件后,他们的文档说到 select 选项“Checkout Maven Project from SCM”等操作。

I've tried to install these plugins, but, first, I realized that they are antiquated.我尝试安装这些插件,但首先,我意识到它们已经过时了。 I discovered that Maven Plugin changed name and address (now is Maven Integration for Eclipse 1.2), and that Maven Plugin Extra does not exist anymore.我发现 Maven Plugin 更改了名称和地址(现在是 Maven Integration for Eclipse 1.2),Maven Plugin Extra 不存在了。 Subclipse, instead, is available.相反,Subclipse 是可用的。

So I installed these plugins, but, afterwords, no "Checkout Maven Project from SCM" functionality was present on my Eclipse. Then I searched online to solve this problem, and I found this thread on StackOverflow.com .所以我安装了这些插件,但是,后来,我的 Eclipse 上没有“从 SCM 签出 Maven 项目”功能。然后我在网上搜索解决这个问题,我在 StackOverflow.com 上找到了这个线程 It suggested to install the Maven SCM handler for Subclipse .它建议为 Subclipse 安装 Maven SCM 处理程序 I've searched it on the plugin repository of Elcipse but it does not exist anymore.我在 Elcipse 的插件存储库中搜索过它,但它不再存在了。

Which Eclipse plugin may I use to get the "Checkout Maven Project from SCM" functionality on my Eclipse IDE?我可以使用哪个 Eclipse 插件在我的 Eclipse IDE 上获取“从 SCM 签出 Maven 项目”功能?

Thanks a lot非常感谢

When you go to Window -> Preferences -> Maven -> Discovery, you have a button "Open Catalog", which opens a plugin marketplace specific to the m2e plugin.当您转到 Window -> Preferences -> Maven -> Discovery 时,您会看到一个“Open Catalog”按钮,它会打开一个特定于 m2e 插件的插件市场。 There you'll find a plugin called m2e-subclipse, which should give you the appropriate options:在那里你会找到一个名为 m2e-subclipse 的插件,它应该为你提供适当的选项:

在此处输入图片说明

Change the installed sub version to have m2 plugin.将安装的子版本更改为具有 m2 插件。 then check out as maven shows up.然后在 maven 出现时查看。

Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project (Optional) and install it. Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project(可选)并安装它。

see images below.见下图。 在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

I have recently run into same issue and found solution, as preferences trick mentioned in this post did not work for me.我最近遇到了同样的问题并找到了解决方案,因为这篇文章中提到的偏好技巧对我不起作用。 All you need to do is to go back to your SVN installation (tested for subversive, guess similar for subclipse) and check m2e integration plug-in.你需要做的就是回到你的 SVN 安装(测试颠覆性,猜测类似 subclipse)并检查 m2e 集成插件。

In my case: Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project (Optional) and install it.就我而言:Eclipse Marketplace -> Installed -> Subversive SVN -> Change -> Subversive SVN Integration for the M2E Project(可选)并安装它。

我有一个解决方法,因为我无法在 Window -> Preferences -> Maven -> Discovery 中找到 m2e-subclipse。您需要查看项目。完成后,右键单击 Project Explorer 并导入->Maven- >Existing Maven Project 并选择签出的项目并单击Finish。

Just a heads up for anybody seeing this again for future versions of Eclipse.只是提醒任何人在未来版本的 Eclipse 中再次看到这一点。

Sonatype is no longer maintaining this: Sonatype 不再维护这个:

You can either use the fork currently being maintainted in github [ https://github.com/subclipse/m2e] : https://dl.bintray.com/subclipse/releases/m2e/1.0.x/您可以使用目前在 github [ https://github.com/subclipse/m2e] 中维护的分叉: https : //dl.bintray.com/subclipse/releases/m2e/1.0.x/

Or you can use the eclipse maintained link for the eclipse version: https://download.eclipse.org/technology/m2e/releases/1.9/1.9.1.20180912-1601/或者你可以使用eclipse版本的eclipse维护链接: https : //download.eclipse.org/technology/m2e/releases/1.9/1.9.1.20180912-1601/

Install either one by using the "install new software" link in Eclipse above "Eclipse Marketplace"使用 Eclipse 中“Eclipse Marketplace”上方的“安装新软件”链接安装任一软件

Eclipse 安装

I used eclipse version 2022-12 from this website https://mergedoc.osdn.jp/我从这个网站https://mergedoc.osdn.jp/ 使用了 eclipse 版本 2022-12
After I face this problem and try many ways.在我遇到这个问题并尝试了很多方法之后。 Finally, I got the solution.最后,我得到了解决方案。

  1. Right-click on repo右键单击回购
  2. Select Find/Check Out As... Select查找/签出为...
  3. Choose Check out as a project with the name specified , then input your project name alias选择Check out as a project with the name specified ,然后输入你的项目名称别名
  4. After checkout is finished.结帐完成后。 Right-click on the project.右键单击该项目。
  5. Select Configure > Convert to Maven Project . Select配置 > 转换为 Maven 项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM