Announcement Announcement Module
Collapse
No announcement yet.
Is a war file created by tc Server? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is a war file created by tc Server?

    I was trying to track down a problem with missing classes (missing jars) and wanted to check out what was in my web apps WAR file. I couldn't find the war file.

    (Q) Is a war file created when using the tcServer?

    NOTE: I found the directory
    c:\springsource\vfabric-tc-server-developer-2.6.4.RELEASE\tcServer\wtpwebapps\mywebapp that appears to be my web app.

    (Q) Is it possible to ask STS (I'm using Springsource Toolsuite 2.9.1) to create a WAR file for a grails web app?

    NOTE: I tried to use the grails command but only found run-war so I used it.

    (Q) Is there a grails command to create the war file? I tried "compile", and "package" and neither generated the war file.

    Thanks,
    PatS

  • #2
    Hi Pat,

    (Q) Is a war file created when using the tcServer?
    (Q) Is it possible to ask STS (I'm using Springsource Toolsuite 2.9.1) to create a WAR file for a grails web app?

    There is a war file that is being created when deploying to tc server (e.g. using "Run As >> Run On Server" menu).
    This file is build inside a 'hidden' staging area in the workspace metadata. For example if my webapp was called 'myapp'.
    Then it would be found here:

    ${workspace}/.metadata/.plugins/com.springsource.sts.grails.runonserver/stage/myapp.war

    I should warn though that this is not exactly what gets deployed.
    STS doesn't deploy it as is. It replaces some of the content of the war file with stuff from your workspace. This to be able to support a smoother experience when you change code. Instead of rebuilding the whole war we replace some of the contents with classes/files from the workspace instead, in some cases. (This feature can be turned off from the project properties page
    Right click project, select "Properties >> Grails >> Run On Server" deselect "incremental war build").

    To get a picture of exactly what gets deployed, the 'wtpwebaps' folder is the best place to look. What you find there is what actually got deployed. This is the contents of the war file + any changes applied by STS.

    (Q) Is there a grails command to create the war file? I tried "compile", and "package" and neither generated the war file.

    Yes, I believe the command is called 'war' :-)
    http://grails.org/doc/latest/ref/Com...0Line/war.html

    Kris

    Comment


    • #3
      Thanks for the response. This was exactly what I was looking for.

      I've mainly used eclipse (not STS) and grails from the command line. While I like what STS / grails integration gives me, when I run into problems I'm not sure where the magic is.

      This has helped demystify what's going on (at least for now).

      I consider this thread closed.

      Comment

      Working...
      X