views:

574

answers:

4

I have a project with a large amount of pre-processing. I have written this part and would now like to convert the project to a GAE project. I have enabled the GAE support in Project->Properties and have some functionality but when I want to testrun the app I get a "Web application archive directory does not exist."

Is there a way to automatically generate the missing folders and files or do I have to do that manually?

I do not want to copy my classes into a newly created project since that would mean loosing all my version control.

+1  A: 

I think that with the GAE plugin for Eclipse, you can create a GAE app skeleton. You just have then to move your old project files into this project, and you're done.

For just conversion, I don't know if it's possible, if the structure of your app is completely different from the GAE structure.

As for the error you have, it seems that your app lacks a WEB-INF directory that any webapp needs to run.

Valentin Rocher
+1  A: 

I am using GAE Eclipse Plugin 1.2.1 and Eclipse 3.4.2 and I have tried the same operation and have been unsuccessful so far. I believe the eclipse plugin is hardcoded to look for the various components at specific locations. (The right approach would have been to configure the GAE plugin to look for the all the WEB-APP components at other locations than the default.) I would think that given these versions, converting an eclipse project directly wouldn't be possible.

A possible solution, given this constraint, would be create a new GAE project and copy all your existing code into that structure without altering the folders already created by the GAE plugin.

Shreeni
A: 

Not sure about the whole GAE specific stuff, but you can copy your old projects contents:

  • Create new GAE-Project
  • Close it
  • Use a file manager outside eclipse to copy all your old projects contents into the new project. Make sure, you include the ".svn" folder, it may be invisible in the explorer/nautilus/whatever. You should also think about leaving the .project file of the new project alone, as it may contain GAE specific configuration.
  • Open the project in Eclipse again
  • Right click project -> Team -> Share project -> Select SVN
  • Your old project URL should be already there, leave the radio button with "Use project settings" checked.

The project connects back to the old repository location, and in sync view you should see the new files as outgoing.

derBiggi
A: 

Don't know if this will work for Java -> GAE project conversion, but I've had luck doing something similiar, converting General -> Java projects using the following steps:

  1. Close your project.
  2. Open your project file (which is located in your root directory of the appropriate project) called .project with your default editor. Search for:

    <natures>
    </natures>

and change it to

 <natures>

      <nature>org.eclipse.jdt.core.javanature</nature>

 </natures>

Store the changed file.

  1. Open the project again - now it's a java project.

Of course you'll need to create a new GAE project and then look inside its .project file to get the correct element contents. I found the above steps googling around, so I can't unfortunately credit the original source of the above instructions.

Maks