简体   繁体   English

在svn-checkout之后,在eclipse下自动更新maven项目

[英]Automatically update a maven project under eclipse, after a svn-checkout

After checking out a maven project from a svn-repository, eclipse shows dependency-errors. 从svn-repository检出maven项目后,eclipse显示依赖错误。 To solve the problem, 要解决这个问题,

  1. I have to right-click on the project-folder, 我必须右键单击项目文件夹,
  2. then I have to click Maven --> Update Project 然后我必须单击Maven - > Update Project

After doing that, the dependendicies of the pom-file are downloaded and the specific classpathes are set. 执行此操作后,将下载pom文件的dependendicies并设置特定的classpathes。

The problem: I have to do this everytime after a checkout of a maven-project. 问题:我必须在结帐maven项目后每次都这样做。

My question: Why should I have to update manually the maven-project? 我的问题:为什么我必须手动更新maven项目? Why didn´t do this the maven-builder automatically? 为什么不自动这样做maven-builder? Is there any way to engage eclipse or the maven-builder to do this automatically? 有没有办法让eclipse或maven-builder自动执行此操作?

If you have Subversive (installable via the Marketplace), you can checkout and set up the project in one step from Eclipse. 如果您有Subversive(可通过Marketplace安装),则可以从Eclipse中一步结账并设置项目。 In the dialog File -> Import try the entry Maven -> Check out Maven Projects from SVN. 在对话框文件 - >导入中尝试条目Maven - >从SVN查看Maven项目。

Unfortunately, maven project configurations tend to get stale when you're changing stuff in the POM. 不幸的是,当您在POM中更改内容时,maven项目配置往往会变得陈旧。 Another tip from me is use the keyboard shortcut for "Update Project" (Alt-F5 on Mac & Windows) which should select the project you're currently in and has the option to update all projects at once. 我的另一个提示是使用“更新项目”(Mac和Windows上的Alt-F5)的键盘快捷键,它应该选择您当前所在的项目,并可以选择一次更新所有项目。

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

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