Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Deploy a Roo project within STS

  1. #11
    Join Date
    Dec 2011
    Posts
    8

    Default

    Quote Originally Posted by Stefan Schmidt View Post
    Hi,

    STS does include a new project wizard for Roo projects: File > New > Roo project. It seems you have not done this but instead added the Roo project nature to an existing project. While this will give you access to the Roo shell in your project it does not imply that your project magically becomes a web project .

    So my first question is, does your own project follow the directory and configuration file naming conventions that Roo expects? Second, if you open the project pom.xml file and see if the project packaging is set to war:

    Code:
    <packaging>war</packaging>
    If so, you can run mvn eclipse:eclipse from your project directory to generate/update the necessary Eclipse workspace config files that mark this project as a Web project. Once that is done, refresh your project in STS and you will find that you can now drag it to any Web container (tcServer, tomcat, dmServer, etc).

    HTH,
    Stefan
    Stefan,

    I am having the same issue described here, but my project does contain the packaging tags in the pom.xml file (below).

    Code:
    <packaging>war</packaging>
    However, I am still unable to deploy it using the server which is part of STS.

    I think I am missing a step when creating the project as a "web" project rather than simply a roo spring project. Can you point me in the right direction on how to properly setup a web project using roo?

  2. #12
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Quote Originally Posted by mikej View Post
    Fyi, I've had better luck using STS to "import maven project" w/o using mvn eclipse:eclipse at all. (I have not tried with recent Roo or the latest STS, but I had what felt like random problems any time I used mvn eclipse:eclipse on a Roo project.)
    On the contrary, I use mvn eclipse:clean eclipse:eclipse all the time to get projects that are acting up — typically when after a application crash — working again. That and a clean rebuild and starting up STS with "-clean" on the first line of the STS.ini file.
    Quote Originally Posted by mikej View Post
    1) Spring maven dependencies are set up to be managed by the pom rather than being imported into a static eclipse library
    This is not so for me, at least not in STS 2.7 and later. I don't remember it from 2.3 either.
    Quote Originally Posted by mikej View Post
    2) I had to remove and re-add AspectJ support to get my projects to recognize the aspects after using mvn eclipse:eclipse - otherwise I had bunches of build errors.
    That figures. This have never happened to me. And I've had loads of other problems with STS.
    Quote Originally Posted by mikej View Post
    3) The "create roo project" template within STS uses the Roo version that shipped with that version of STS, rather than using the (newer) version of Roo that I have on my classpath. So I find it more consistent to create the project outside of STS and then import it as a Maven project.
    You can change the Roo version used in the preferences. You have explored the preferences and project properties, have you not? Some versions of Roo have been incompatible with later versions of STS, but usually this have been fixed at the Release stage.

    Anyway, besides a long standing bug that causes Roo projects to intermittently be created as a jdk6 project even when all settings are for jdk5, it have seldom mattered where I've created a Roo project.

    This all said, my biggest problem are with Spring Roo projects that are put into an unstable state because of crashes and these take a lot of effort to repair these effectively. It's getting better, but the instability is still there. On the other hand I've been pushing it with Roo 1.2 nightlies, though I doubt that nor my aging jdk1.5 that is the sole cause of this. But that's another story.

    Considering I'm running STS 2.9M1 on a Dual G5 from 2005 with 8gb ram and jdk1.5 in OS X 10.5.8, why are you using such an old version of STS? Is this a deliberate choice not to upgrade and what have you gained from it? I'm curious.

  3. #13
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Is there some way to deploy to an external Tomcat server from within STS? Preferably via SSH.

  4. #14
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    mp257784, use web mvc setup

    Read the Roo 1.2 manual in the docs and the smoke will clear right out.

  5. #15
    Join Date
    Dec 2011
    Posts
    8

    Default

    Perhaps not. I've run through each of the samples mentioned on the getting started page both from the roo shell without eclipse and also within eclipse using STS.

    In each instance, every example fails with various errors. I've read the docs as well and frankly they give conflicting information. The docs do not match the commands given in the samples as some have been deprecated.

    I'm sure roo works but following the docs doesn't do it.

  6. #16
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    You should read all of the 1.2 docs, especially the command overview and make a note for every command that is deprecated and peruse the newer ones in their place. The documentation currently unfortunately give conflicting information if you read only certain parts. Read everything.
    Use "jpa setup" instead of "persistence setup", "web mvc scaffold" instead of "controller scaffold", "entity jpa" instead of just "entity" and so on. While the older commands should still work, for some reason they haven't for me, at least not in the nightly builds.

    Have you tried the sample project folder in your Roo distribution too?

    It took me quite a long time to get into Roo one year ago. The only way is to make small projects with clear goals, use a versioning system for everything and analyze these projects and their settings. Look for the patterns and read up on all the involved Spring frameworks so you're not limited to what Spring generates.

    I've been reading "Spring Roo in Action", "Spring in Practice", Spring in Action, Spring Roo 1.1 Cookbook as well as Pro JPA 2 which I needed as I was totally fresh on Spring one year ago.
    Last edited by MiB; Dec 21st, 2011 at 03:06 PM.

  7. #17
    Join Date
    Dec 2011
    Posts
    8

    Default

    Quote Originally Posted by MiB View Post
    Have you tried the sample project folder in your Roo distribution too?

    Yes, see my earlier post.

  8. #18
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Well, then I suggest you start a new thread, post all of your roo script file, system details and perhaps vital parts of the project and let the community help you get started.

    Actually, all I could see in your earlier posts was
    each of the samples mentioned on the getting started page
    thus not the sample folder.
    Last edited by MiB; Dec 21st, 2011 at 04:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •