Announcement Announcement Module
Collapse
No announcement yet.
STS Not Detecting Grails Project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 04:26 PM. Reason: Left out eclipse...

  • #2
    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, 05:35 PM. Reason: spelling...

    Comment


    • #3
      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?

      Comment


      • #4
        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.

        Comment


        • #5
          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, 09:14 AM.

          Comment


          • #6
            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.

            Comment


            • #7
              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"?

              Comment


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

                Comment


                • #9
                  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?

                  Comment


                  • #10
                    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!

                    Comment

                    Working...
                    X