Results 1 to 10 of 10

Thread: STS Not Detecting Grails Project

  1. #1
    Join Date
    Apr 2010
    Posts
    17

    Default STS Not Detecting Grails Project

    I am trying to import an existing Grails project (using 1.3.0) into STS (2.3.2). I've installed Grails support, then followed the directions on http://www.grails.org/STS+Integration for importing an existing Grails project. I chose my dev directory (~/builds) as the root, STS scanned it, and offered several of my Grails (and other) projects in the directory to import, except the one I'm interested in! All others were listed. I tried creating a tarball of the project and importing it that way, but STS did not recognize it as a Grails project (or anything at all).

    I tried Netbeans, and it imported the same project without trouble. What is the issue here? I tried comparing my project with other Grails projects (that are detected by STS) but I don't know what to look for - at the top level at least they all have the same directories and application.properties file.

    I'm going to try raw Eclipse (with the Groovy plugin) and see if there is any better luck. I'd much prefer STS, however...

    Any hints?
    Last edited by zak89; May 28th, 2010 at 04:26 PM. Reason: Left out eclipse...

  2. #2
    Join Date
    Apr 2010
    Posts
    17

    Default

    Well, not much luck with raw Eclipse apparently STS is the only way to get Grails support in Eclipse) - I did stumble across this post: http://andrewclement.blogspot.com/20...grails-13.html

    Which sounded very hopeful, though nobody mentioned what the "issues" with Grails 1.3 and STS were. I followed the directions and successfully updgraded STS as instructed, but it hasn't changed anything. I tried upgrading an older Grails app to 1.3.0, and STS had no trouble with it. This must be specific to my project - what should I look for? Remember, Netbeans loaded it without a hitch - it can't be that corrupted.
    Last edited by zak89; May 28th, 2010 at 05:35 PM. Reason: spelling...

  3. #3
    Join Date
    Apr 2010
    Posts
    17

    Default

    Ok, I think I found the issue - one of my coworkers got rid on the .project and .classpath files generated by Grails - does anyone know how I can regenerate these?

  4. #4
    Join Date
    May 2010
    Posts
    3

    Default

    Quote Originally Posted by zak89 View Post
    Ok, I think I found the issue - one of my coworkers got rid on the .project and .classpath files generated by Grails - does anyone know how I can regenerate these?
    What is your S.O.?

    I've had the same problem with Ubuntu. My solution: create .project, .classpath in Windows and copy them to Ubuntu.

  5. #5
    Join Date
    Apr 2010
    Posts
    17

    Default

    My solution: create .project, .classpath in Windows and copy them to Ubuntu.
    That sounds hopeful, but how did you create those files in Windows?

    By "S.O" do you mean OS? I'm running 64bit Linux Mint
    Last edited by zak89; May 29th, 2010 at 09:14 AM.

  6. #6
    Join Date
    May 2010
    Posts
    3

    Default

    Quote Originally Posted by zak89 View Post
    That sounds hopeful, but how did you create those files in Windows?

    By "S.O" do you mean OS? I'm running 64bit Linux Mint
    Yes, S.O. = OS (I'm spanish ...).

    You can generate this files with STS: "your Grails project", second button: Configure -> Convert to Grails project... It generate '.classpath' and '.project' correctly.

  7. #7
    Join Date
    Apr 2010
    Posts
    17

    Default

    That sounds perfect - the problem is that I need to import my Grails project first, right? Right now STS doesn't recognize my project as a project -how do I get it imported just as a generic "project"?

  8. #8
    Join Date
    May 2010
    Posts
    3

    Default

    Yes, first you must to import project as generic project. Can you do it?

  9. #9
    Join Date
    Apr 2010
    Posts
    17

    Default

    Well, I don't know. Here's what I tried.

    File -> Import ->Existing Project into Workspace -> (select my dev directory) -> [at this point I get a list of projects to import; the one I need is not included]

    So is there a different Import setting I need to use? I noted that the "Existing Projects into Workspace" specifically says it imports "Eclipse projects".

    Which is basically the problem - my Grails project is not an Eclipse project (because of the missing .project file). So how do I convert a simple project directory into an Eclipse/STS project?

  10. #10
    Join Date
    Apr 2010
    Posts
    17

    Default

    Ok, I think I'm getting somewhere...

    I tried creating a "new" Java project, selected the option to create a project from existing sources, and chose my Grails project. Then I tried the Configure -> Convert to Grails project action you suggested. It seems to have worked, the project runs as a Grails project in STS now, however there are some errors I don't get (these are probably specific to my project and I'll check with my coworkers about it.

    Overall, however, I think this is working...

    Thanks so much for the help!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •