简体   繁体   中英

What's a sane workflow for (re)generating Eclipse project files in Java Play Framework?

I can generate Eclipse files for a Play 2.1 project via:

$ play eclipse with-source=true

... and then I can do File -> Import [Existing Project] in Eclipse.

That works great -- but when I want to add a dependency to project/Build.scala , I can't figure out how to get this to update in Eclipse. The only working solution I have is:

  1. Delete project from Eclipse
  2. Re-run play eclipse
  3. Re-import project into Eclipse

Which can't be "the right way." ( Or can it? )

Related question (but addresses an older version of Play): Eclipse not updating referenced libraries for my Play framework application

This works for me (using Eclipse Juno):

If you add a dependency, use the play console to reload the project:

[play] $ reload

Then rebuild the eclipse configuration:

[play] $ eclipse

Then refresh the project within eclipse by right clicking on the project and clicking Refresh .

There's no need to delete the project and create a new one.

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