Announcement Announcement Module
Collapse
No announcement yet.
How to deploy a war file created in Maven to tc server in STS? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to deploy a war file created in Maven to tc server in STS?

    Hello - I've been playing around with some STS sample projects, can can get them working using the included jetty server. I've also been able to import them to STS by using "mvn eclipse:eclipse" and then importing the project. However, I would like to deploy the war file that get created in one of the project to the tc server that comes with STS. How would I go about doing this?

    Thanks!

  • #2
    Simply don't... Simply select Run As -> Server -> Select tc Server or drag the project to the server instance. You don't need to create a war and deploy that.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      Simply don't... Simply select Run As -> Server -> Select tc Server or drag the project to the server instance. You don't need to create a war and deploy that.
      Unfortunately, the project doesn't have that option, and if I try to drag in onto the server, it just shows the "do not enter" icon. It's the "echo" example from the samples for Spring-ws, so it's a Spring web service.

      I tried turning it into a web project by configuring it as a faceted form and selecting "Dynamic Web Module", but in that case the echo client receives a "404 not found".

      Any other thoughts?

      Thanks for the reply.

      Comment


      • #4
        Is your project a war project (is packaging set to war?) also if you have STS you can simply import the project as maven project and you don't need to do eclipse:eclipse. Also try using the most recent version of the eclipse plugin for maven (2.9 if I'm not mistaken) which might have better WTP support.

        You might also want to try to set the wtpversion property on the plugin to force WTP file generation.

        Comment


        • #5
          Originally posted by Marten Deinum View Post
          Is your project a war project (is packaging set to war?) also if you have STS you can simply import the project as maven project and you don't need to do eclipse:eclipse. Also try using the most recent version of the eclipse plugin for maven (2.9 if I'm not mistaken) which might have better WTP support.

          You might also want to try to set the wtpversion property on the plugin to force WTP file generation.
          Marten - the packaging is set to war. But, when I try to import it to STS, using file, import, existing project into workspace, and choose the project, it says "no project are found to import" on the dialog box. If I try it with file, new java project, and specify the server folder, it imports but has lots of errors due to the annotation not being found. Is this affected by the WTP version?

          How does one import a maven project into STS?

          Thanks!

          Comment


          • #6
            It isn't an existing project. You should use Import -> Maven Project..

            Existing projects are existing Eclipse projects not maven projects.

            Comment


            • #7
              Originally posted by Marten Deinum View Post
              It isn't an existing project. You should use Import -> Maven Project..

              Existing projects are existing Eclipse projects not maven projects.

              got it - thanks! I still wish I could figure out a way to deploy that war file to the tc server, though. There's got to be a way.

              Comment


              • #8
                Try to copy your war into the directory where your server is running. The auto deployment worked for me.

                http://static.springsource.com/proje...cgsdeploy.html

                Comment

                Working...
                X