Announcement Announcement Module
No announcement yet.
Work from SVN Repository Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Work from SVN Repository

    I am new to STS and not very familiar with Eclipse in general.

    I have a GRAILS project that I am working on, that is controlled via SVN.

    First, is there a way in STS to import/start a grails project from a repository?

    Secondly, one way I am working around this right now is by checking out the project manually somewhere, then in STS I do
    New > Grails Project > "Create Project from existing source"
    Then I find my svn directory.
    The problem is that all my repository as like that:
    projectname > trunk (or branch, etc ...).
    That is, the actual code is in "trunk", not "projectname".

    When I browse for my project in STS it asks me for a project name, and a directory. The only I managed to make it work was by choosing the project name "trunk", and selecting the directory above it. Which of course very inconvenient because now my project is called "trunk" (and I might have many projects all called "trunk").

    I'm obviously doing all of this the wrong way ...

    Windows 7 x64 (but using STS 32-bit, with JDK 32-bit)
    SpringSource Tool Suite
    Version: 2.3.0.RELEASE
    Build Id: 200912171331

  • #2

    I notice you have been making progress on this issue on the grails list:

    If you are still hanging (as you mention on grails-users), you can try to capture a thread dump for us to look at with jps/jstack. Or you could try to start eclipse with the '-clean' option to see if that gets past the hang.

    Andy Clement


    • #3
      -clean didn't help.

      Could you give me more details about how to get you the thread dump?



      • #4
        Use jps to discover your java processes and find out which is STS. Then use "jstack <processId>" to dump the threads.



        • #5
          I don't see "STS", but here is what I have ...

          c:\Program Files (x86)\Java\jdk1.6.0_18\bin>jps
          20500 Jps
          19752 Program
          c:\Program Files (x86)\Java\jdk1.6.0_18\bin>jstack 19752
          see attached file, too long to paste


          • #6
            I think I selected the wrong JRE when creating the project.
            I renamed the workspace directory and I was then able to start STS.
            Then I re-created the project from SVN and it now works!

            Although the structure displays differently than my original.
            It used to show my packages, now it's just browsing directories.
            It's not bad, just saying.




            • #7
              I asked someone to take a look at the thread stacks you attached. I am suspecting it was subclipse at the moment - I have seen hangs with the svn eclipse plugins. But glad to hear you have something working now.



              • #8
                Originally posted by nasht00 View Post
                I have a GRAILS project that I am working on, that is controlled via SVN.

                First, is there a way in STS to import/start a grails project from a repository?
                If the Eclipse .project and .classpath files are committed to SVN, then you just need to select the folder for the project and check it out. It will be checked out as an Eclipse Project.

                When I first started on a Grails project that other developers that do not use Eclipse had put into SVN what I did was check out the project using the command line first. Then in STS, I created a new Grails project from scratch, just so that I could get the .project and .classpath files created. I then copied those files into the local checkout I had for the other project. I edited them in a text editor to set the Project name etc. but you do not have to do this.

                Then back in Eclipse, I deleted this test Grails project since I did not need it anymore. Finally I do File > Import > Existing Projects into Workspace. Then in the wizard, you should just have to point it at the checked out project and it will register it with Eclipse. If you commit the .project and .classpath files then future Eclipse users will not have to do all of this.

                See this thread for techniques on managing the .classpath file so that it does not contain hard-coded path names. This is important if you have more than one STS user that wants to checkout the project: