简体   繁体   中英

Play Framework 1.2.4 Exporting/Importing project into Eclipse IDE

I have done a small project using Play Framework 1.2.4 and now I need to share it with my team members for further proceedings on that. I am using Eclipse Indigo for the project.

I tried exporting it into a WAR but when my team mates import it using the WAR option, they are getting lots of compilation errors.

Kindly let me know in which format should I share so that they don't get any compilation errors while importing it into their workspace.

From the documentation :

Play provides a command to simplify Eclipse configuration. To transform a Play application into a working Eclipse project, use the eclipsify command:

# play eclipsify myApp

You then need to import the application into your Workspace with the File/Import/General/Existing project… menu.

Your coworkers should simply get the sources of the project, and run this command to generate an Eclipse project. You don't have to export anything. BTW, a war file is a deployable Java EE artefact. It's not meant to contain the sources of a Play framework project.

Side note: it's the second answer that I give you in a row that can be found in the documentation. Maybe you should read it.

For newer versions of play the command is play eclipse

Then File -> Import.. -> Existing Projects into workspace

Don't check any boxes (ignore 'copy projects into workspace')

Excellent, I agree with @JB Nizet and Connor.However this answer applies to old version of PLAY framework. My answer might be helpful for developers using Play Framework 2.3+ and come searching, the command to transform a Play application into a working Eclipse project.

  • CD into your project source folder
  • Run Activator eclipse projectName
  • You are done ! Import the PLAY project as every other existing JAVA Project.

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