Results 1 to 4 of 4

Thread: Grails 1.3.6 with STS 2.5.2 - Issue with Plugin View pages

  1. #1

    Question Grails 1.3.6 with STS 2.5.2 - Issue with Plugin View pages

    Hi,

    I am using Grails 1.3.6 with SpringSource Tool Suite

    Version: 2.5.2.RELEASE
    Build Id: 201101081000

    I have been facing a quite strange issue for quite some time. I had posted this issue in stackoverflow.com as well. http://stackoverflow.com/questions/4...ew-pages-issue

    When I build war from STS and deploy to Tomcat, I have noticed that all the view pages for the plugins I have used (even for the one I had custom build) are being copied to WEB-INF/classes folder in war file.

    WEB-INF/classes also has class files names such as gsp_plugin_test_webapp_WEB_INF_classes_doc_header_ gsp.class

    This is happening for all Plugin's.

    For e.g. I have used Spring Security UI plugin. In the war file that is
    build, the plugins folder under WEB-INF has all the required view pages.
    i.e. \WEB-INF\plugins\spring-security-ui-0.1.2\grails-app\views\aclClass has
    create.gsp, edit.gsp, search.gsp.

    But the problem is, in WEB-INF\classes I have
    \WEB-INF\classes\aclClass\create.gsp
    \WEB-INF\classes\aclClass\edit.gsp
    \WEB-INF\classes\aclClass\search.gsp

    This is happening for all the plugins. classes folder also has class files having names webapp_WEB_INF_classes_. For e.g.

    This is not right. Because when I try to access the plugin view pages, I get 404 error.

    I am not sure what is wrong. Can anyone please point out what could be going wrong?

    Thank you.
    Jay Chandran
    Last edited by jay.chandran; Feb 2nd, 2011 at 03:02 AM.

  2. #2
    Join Date
    May 2010
    Posts
    411

    Default

    Hi Chandran,

    Thanks for coming to the forum with your issue.

    Just to make sure we are going on the same assumptions... when you say you are building the war file in STS, I assume that means you are using the Graills Command Prompt popup dialog to run the war command... right? (Or maybe you are using the Run On Server functionality, which doesn't work quite the same way).

    I have recently discovered that grails war command uses the same target directory for compiling source code as our (STS) Groovy Eclipse compiler. If you are seeing files in the war file you didn't expect to see, then it is probably files that were compiled by the Groovy Eclipse compiler.

    Stuff from plugins can indeed end up in the WEB_INF\classes folder that way because plugin source folders are added to the project's classpath for the Greclipse compiler.

    This shouldn't really be a problem... but maybe we are compiling things that we shouldn't be compiling and need to tweak some of the classpath entries we create for plugin sources.

    While I'm not 100% sure this explanation is right, this is probably what is happening.

    Also I think we should consider this a bug in STS Grails tooling, and it needs to be fixed somehow.

    I may need your help in figuring out the exact nature of the problem and the best way to implement the fix. I'm hoping that, since this bug is a bit of pain to you, you'll be willing to work with me a bit to get this fixed properly.

    I'll post a link to the Jira issue I'm going to create shortly.

    Kris
    Kris De Volder -- SpringSource

  3. #3
    Join Date
    May 2010
    Posts
    411

    Default

    I created an issue here

    https://issuetracker.springsource.com/browse/STS-1539

    I'm going to try to reproduce the problem locally, but what would really help me, is if you could distill down a set of precise steps I take to create project that exhibits the problem, or a zipped copy of a project that already has the problem.

    If you could add something like that to the issue it would be greatly appreciated.

    Thanks,

    Kris
    Kris De Volder -- SpringSource

  4. #4

    Default

    Hi Kris,

    Thanks for your help. I have updated JIRA with my comments, sample project and war file.

    Thanks a lot.
    Jay

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
  •