Results 1 to 8 of 8

Thread: Work from SVN Repository

  1. #1
    Join Date
    Jan 2010
    Posts
    10

    Exclamation Work from SVN Repository

    Hi,
    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. #2
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    Hi,

    I notice you have been making progress on this issue on the grails list: http://n4.nabble.com/STS-SVN-td1462083.html#a1469252

    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.

    regards,
    Andy
    ---
    Andy Clement
    SpringSource

  3. #3
    Join Date
    Jan 2010
    Posts
    10

    Default

    -clean didn't help.

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

    Thanks!

  4. #4
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

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

    Andy

  5. #5
    Join Date
    Jan 2010
    Posts
    10

    Default

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

    Code:
    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
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2010
    Posts
    10

    Default

    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.

    Thanks

    Nathan

  7. #7
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    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.

    cheers
    Andy

  8. #8

    Default

    Quote 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:

    http://forum.springsource.org/showthread.php?t=82928

    Mark

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
  •