Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-745

STS Grails support: Grails dependency support adds .svn directories to plugin source directories when using in-line plugins

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.3.0.RELEASE
    • Fix Version/s: Sprint 8, 2.3.1.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:
      STS 2.3.0 Linux 32 bit , Grails 1.2.0

      Description

      I have a Grails project that has some custom inline plugins defined in BuildConfig.groovy.

      Grails dependency support adds .svn directories to plugin source directories. .svn directories should be ignored.

      Example from .project

      		<link>
      			<name>Store-grails-app-.svn</name>
      			<type>2</type>
      			<location>/home/user/workspace/MyPlugin/grails-app/.svn</location>
      		</link>

        Activity

        Hide
        cdupuis Christian Dupuis added a comment -

        .svn and CVS folders are now ignored. Any other folders to ignore?

        Christian

        Show
        cdupuis Christian Dupuis added a comment - .svn and CVS folders are now ignored. Any other folders to ignore? Christian
        Hide
        potter_ru Igor E. Poteryaev added a comment -

        Working with project having inplace plugins I see same problem grails-app/.svn for all inplace plugins was added to classpath.

        It seems to me that in com.springsource.sts.grails.core.internal.classpath.GrailsClasspathContainer.java test for ".svn" prefix should be replaced with test for ".svn" suffix.

        line 197:

        if(name.startsWith(".svn") || name.equals("CVS")) {

        should be replaced with:

        if(name.endsWith(".svn") || name.equals("CVS")) {

        Hope this helps.

        My environment: STS 2.3.2.RELEASE, Linux 32 bit, Grails 1.1.1

        Show
        potter_ru Igor E. Poteryaev added a comment - Working with project having inplace plugins I see same problem grails-app/.svn for all inplace plugins was added to classpath. It seems to me that in com.springsource.sts.grails.core.internal.classpath.GrailsClasspathContainer.java test for ".svn" prefix should be replaced with test for ".svn" suffix. line 197: if(name.startsWith(".svn") || name.equals("CVS")) { should be replaced with: if(name.endsWith(".svn") || name.equals("CVS")) { Hope this helps. My environment: STS 2.3.2.RELEASE, Linux 32 bit, Grails 1.1.1
        Hide
        khelenek kris helenek added a comment -

        Can we re-open this issue? I also still see the problem on 2.3.2.

        Show
        khelenek kris helenek added a comment - Can we re-open this issue? I also still see the problem on 2.3.2.
        Hide
        lhotari Lari Hotari added a comment -

        Please re-open this issue. I've also noticed this problem on 2.5.2 .

        Another possibility would be to fix this on Grails side in grails.util.PluginBuildSettings.getPluginSourceFiles to filter out non-existing directories and directories starting with a dot (.).

        Filtering non-existing directories is important when teams are using CVS repositories. CVS doesn't add empty directories to the repository. Un-existing directories cause problems in building the project.

        Should this be fixed on Grails side?

        Show
        lhotari Lari Hotari added a comment - Please re-open this issue. I've also noticed this problem on 2.5.2 . Another possibility would be to fix this on Grails side in grails.util.PluginBuildSettings.getPluginSourceFiles to filter out non-existing directories and directories starting with a dot (.). Filtering non-existing directories is important when teams are using CVS repositories. CVS doesn't add empty directories to the repository. Un-existing directories cause problems in building the project. Should this be fixed on Grails side?
        Hide
        lhotari Lari Hotari added a comment -

        .svn should be filtered on Grails side, but there is a bug in PluginBuildSetting L582. EXCLUDED_RESOURCES are "ant patterns" but they are just tested with string matching (endsWith).

        Show
        lhotari Lari Hotari added a comment - .svn should be filtered on Grails side, but there is a bug in PluginBuildSetting L582 . EXCLUDED_RESOURCES are "ant patterns" but they are just tested with string matching (endsWith).
        Hide
        lhotari Lari Hotari added a comment - - edited

        Issue in Grails Jira: http://jira.codehaus.org/browse/GRAILS-7213 .
        This issue has been fixed now (release in 1.3.7).

        Show
        lhotari Lari Hotari added a comment - - edited Issue in Grails Jira: http://jira.codehaus.org/browse/GRAILS-7213 . This issue has been fixed now (release in 1.3.7).

          People

          • Assignee:
            Unassigned
            Reporter:
            lhotari Lari Hotari
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: