简体   繁体   English

从SCM检出Maven项目:断开连接并合并

[英]Checkout maven project from SCM: disconnect and merge

Whenever checking out Maven project from svn server in Eclipse, it creates a new folder like maven.xxxxxxxxxxxx under the target workspace. 每当从Eclipse中的svn服务器中检出Maven项目时,它都会在目标工作区下创建一个新文件夹,例如maven.xxxxxxxxxxxx After specific time, it disconnected from SVN server. 经过特定时间后,它与SVN服务器断开连接。

My question is when the new checkout process is started again:- 我的问题是新的结帐流程何时再次开始:-
Can the next checking-out process merge to one of the existing folder maven.xxxxxxxxxxxx ? 下一个签出过程可以合并到现有文件夹maven.xxxxxxxxxxxx吗?

Any input would be appreciated!! 任何输入将不胜感激!

No, not directly. 不,不是直接。 This happens if something stops the import step. 如果某些操作停止了导入步骤,则会发生这种情况。 While I can not tell you wat exactly went wrong in your case, I can tell you how to solve it: 虽然我不能告诉您wat在您的情况下确实出了问题,但我可以告诉您如何解决:

Rename the maven.xxxxx folder in your workspace to the real project name. 将工作区中的maven.xxxxx文件夹重命名为真实的项目名称。

The select File -> Import... -> Existing Maven Project and choose the project folder. 选择File -> Import... -> Existing Maven Project然后选择项目文件夹。 The project will appear in your workspace as maven project. 该项目将作为Maven项目出现在您的工作区中。

Depending on your eclipse configuration and plugins environment, you might also need to right-click on your new project and select Team -> Share... -> SVN (if there is a long list of options under Team , it is already correctly identifed as SVN project). 根据您的Eclipse配置和插件环境,您可能还需要右键单击新项目,然后选择Team -> Share... -> SVN (如果Team下有很长的选项列表,则已经正确识别了作为SVN项目)。

Update 更新

If your maven.xxxx folder is empty, than you seem to have connection problems. 如果您的maven.xxxx文件夹为空,则似乎存在连接问题。 Split the checkout and the import part: 拆分结帐和导入部分:

  • Switch to the "SVN Repository Exploring" perspective, create the repository (if not already there). 切换到“ SVN资源库浏览”透视图,创建资源库(如果尚未存在)。 Can you browse the repository? 您可以浏览存储库吗? If not, you have a connection problem (proxy?). 如果不是,则您有连接问题(代理?)。
  • Right click your SVN project and select -> Checkout... 右键单击您的SVN项目,然后选择-> Checkout ...
  • Select Check out as project in the workspace 选择工作区中的签出为项目
  • This checks out the project as simple resource project 这会将项目检出为简单资源项目
  • now back in the java perspective you can either delete the project and do an "Import existing Maven Project" or convert the project to a maven project using right-click -> Configure -> Convert to Maven project (exact command may vary with your m2e version). 现在回到Java透视图中,您可以删除项目并执行“导入现有Maven项目”,或使用right-click -> Configure -> Convert to Maven project (确切的命令可能会因您的m2e而异版)。

If everything elese fails, try to checkout your project using TortoiseSVN (on Windows) or the commandline and doing "import -> existing maven project" afterwards. 如果一切都失败了,请尝试使用TortoiseSVN(在Windows上)或命令行检出您的项目,然后再执行“导入->现有的maven项目”。

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

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