简体   繁体   中英

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. To solve the problem,

  1. I have to right-click on the project-folder,
  2. then I have to click Maven --> Update Project

After doing that, the dependendicies of the pom-file are downloaded and the specific classpathes are set.

The problem: I have to do this everytime after a checkout of a maven-project.

My question: Why should I have to update manually the maven-project? Why didn´t do this the maven-builder automatically? Is there any way to engage eclipse or the maven-builder to do this automatically?

If you have Subversive (installable via the Marketplace), you can checkout and set up the project in one step from Eclipse. In the dialog File -> Import try the entry Maven -> Check out Maven Projects from SVN.

Unfortunately, maven project configurations tend to get stale when you're changing stuff in the POM. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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