Announcement Announcement Module
Collapse
No announcement yet.
Grails dependencies [Grails 1.3.5] (unitialized) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grails dependencies [Grails 1.3.5] (unitialized)

    I have just installed 2.5.2 and continue to have the same problem I was experiencing under 2.5.1, namely, when I import an existing Grails project I end up with this Grails unitialized message.

    If I create a new Grails project from scratch the Grails dependencies are fine so it seems that my Grails configuration is okay. What does this message mean and how do I go about fixing it?

    I have been frustrated in my attempts to get STS to work for me since the SpringOne Conference in Chicago. My hope was that 2.5.2 would fix things but I just don't seem to be able to get off the ground.

    Thanks for any help.

  • #2
    Hi,

    The intention with 2.5.2 is that if anything is that we would recognize many common issues with project imports and help you fix them by taking you through some easy dialogs. The supported scenarios at the moment are discussed in the 'New and Noteworthy' ( http://download.springsource.com/rel...noteworthy.pdf ) section "Smoother user experience importing existing Grails Projects".

    To understand why your scenario doesn't fit with the supported one, could you let me know:

    - what level of grails was used to build the original project?
    - have you installed the grails 1.3.6 from the extensions page in STS 2.5.2 - if not, what level of grails have you defined to STS?
    - I presume it already has .classpath/.project files at the top level? (valid versions of these are created by recent grails versions, but they may get lost if the project was committed then retrieved from svn if you chose not to commit them)

    I presume you are doing File>Import existing project and not defining a new project pointing to the existing project?

    I'll get the developer who has been working in this area to chip-in too

    cheers
    Andy
    ---
    Andy Clement
    SpringSource, a division of VMware

    Comment


    • #3
      Hi Andy.

      The project was originally built using Grails 1.0.3. It has been running at 1.0.5 until we recently upgraded it to 1.3.5.

      I did not install Grails from the extension page but have STS referencing my Grails 1.3.5 install as the only (and default) version defined to it.

      Among the things I have done is to delete the .classpath and .project files at the root of the project and run "grails integrate-with --eclipse". It created new files but otherwise did not change my experience.

      I have tried File->Import as well as creating File->New->Grails Project referencing the existing project. Again, no difference in my experience.

      I don't know if this is related or if it is just that long since I have used eclipse for development (We have adopted IntelliJ up to this point because of its Grails support.) but when I try to import my project (known as "partners") some other things seem odd to me. It is hopefully not a surprise that we have multiple active branches of the project, so on my PC I have a partners directory with trunk, 2.1, 2.2... subdirectories. I am trying to import trunk.

      When I select the trunk directory it forces me to name the project the same, "trunk". The Console tab says (among other things), "Created Grails Application at C:\cfgapps\partners\trunk/trunk"(?!), and I end up with a project named "partners" (I would really like it to be named "partners trunk", but that is a problem for a later date.) with a location of C:\cfgapps\partners\trunk.

      It also does not seem to honor my BuildConfig.groovy plugin setting (grails.project.plugins.dir="./plugins") because it goes through installing the tomcat 1.3.5 plugin to C:\Documents and Settings\agoodspeed\.grails\1.3.5\projects\trunk\p lugins.

      Thanks again for any help. My shop was very hopeful following the webinar this past Thursday but we continue to be frustrated in making it work in an existing environment.

      -Andy Goodspeed

      Comment


      • #4
        Thanks for all that background info on your setup! We'll get it working properly for you. We really recommend the File>ImportExistingProject rather than the File>New (and pointing it at an existing one).

        The integrate-with command should have given us some nice valid .project/.classpath files.

        The dialogs we've added probably didn't trigger because everything looked ok - a 1.3.5 project being imported into an eclipse where 1.3.5 is the default grails install. I presume you've run a refresh dependencies (not that you should have to...) and it made no difference?

        It also does not seem to honor my BuildConfig.groovy plugin setting (grails.project.plugins.dir="./plugins") because it goes through installing the tomcat 1.3.5 plugin to C:\Documents and Settings\agoodspeed\.grails\1.3.5\projects\trunk\p lugins.
        I'll look at this.

        cheers
        Andy

        Comment


        • #5
          Okay, well, the Refresh Dependencies failed but pointed out the (a?) problem.
          Error
          DOMSource cannot be processed: check that saxon8-dom.jar is on the classpath
          net.sf.saxon.trans.DynamicError: DOMSource cannot be processed: check that saxon8-dom.jar is on the classpath
          at net.sf.saxon.event.Sender.send(Sender.java:171)
          ...
          You see, a vendor has forced us to include the saxon8.jar file in our project. When I remove that I can run Refresh Dependencies and it gets better, then I can replace saxon8.jar and it is still okay (although running Refresh Dependencies takes me back to "uninitialized"). What a pain.

          For my ant build I already have to set -Djavax.xml.transform.TransformerFactory=... so that junitreport can parse the unit test output.

          Hopefully STS will work better for me now that I have an initialized Grails set up. Pressing on...

          Comment


          • #6
            To follow up on what I was investigating. There is an issue with us respecting grails.project.plugins.dir. I've raised https://issuetracker.springsource.com/browse/STS-1509 - I've already committed some of the fix, that will likely be in tonights build.

            The problem is that if a linked source folder was created in the past pointing into the default install location (home/.grails/etc...) then it is never repaired to point to the new location (./plugins/...). Until the fix is out you can work around this by:

            1. reveal the linked source folder (customize the project explorer view and turn off the 'Grails Project Filter')
            2. look for tomcat-1.3.6-src-groovy (or others), delete it.
            3. run refresh dependencies

            this will recreate it pointing to the right location. So, just to confirm, it should be OK for all plugins installed after the grails.project.plugins.dir is set, but for any installed before, they will never get 'fixed' when grails reinstalls the plugins at the new location.

            Andy

            Comment

            Working...
            X