Announcement Announcement Module
Collapse
No announcement yet.
How to develop add-on for Spring Roo? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to develop add-on for Spring Roo?

    As Roo main use case is to make a proliferation of addons so I presume developing addons should be easy and straightforward.

    Where do I find a tutorial or guide for developing a Roo addon?

    Thanks!

  • #2
    Hi,

    Yes we want to engage the community to write new Roo add-ons very soon. Expect to see blog posts, conference talks and documentation very soon.

    At the moment hat we are doing a few refactorings to the add-on API (to improve usability). This is also the reason why we have not promoted add-on development too much as of yet as our changes might break existing add-ons out there.

    Stay tuned!

    -Stefan

    Comment


    • #3
      Originally posted by Stefan Schmidt View Post
      Hi,

      Yes we want to engage the community to write new Roo add-ons very soon. Expect to see blog posts, conference talks and documentation very soon.

      At the moment hat we are doing a few refactorings to the add-on API (to improve usability). This is also the reason why we have not promoted add-on development too much as of yet as our changes might break existing add-ons out there.

      Stay tuned!

      -Stefan
      Thank you.

      Does Spring Roo use OSGi? If not, why and is there a plan to run Roo with OSGi?

      During Roo addon development, is "hot deploy" possible? Rapid turnaround is needed because a Roo addon is a "hosted app". i.e. analogically Roo is the Tomcat and addon is the WAR. If Roo is using OSGi I think this is more likely.

      If so it's probably a good thing to base Roo of Felix Karaf. Installation of Roo addons would then simply deploying the Roo addon bundles inside the Karaf `deploy` folder, or by using `obr/install` or `osgi/install` from inside the shell. It'd be great if maintaining/extending a Roo installation is as easy as developing an app with Roo itself.

      Comment


      • #4
        Really No Documentation For Addons?

        Is there seriously no documentation on creating an addon or modifying existing addons? I've done some analysis of roo and there are many slick features, don't get me wrong, but if I can't easily modify and extend it, it is of no use to me. Please tell me there's some information somewhere on the roo metamodel architecture and how to generate custom code.

        Comment


        • #5
          @ceefour

          Given that you can incrementally develop with Roo I believe you can do the same when developing addons, but i haven´t got time yet to try so don´t take me too serious until Ben or Stefan confirm it.

          Roo´s not a Runtime, it´s a tool for generating apps, I think the OSGi model (I´m a OSGi believer by any means) it´s a bit "sophisticated" for Roo´s addon needs. Do you think Roo needs addon isolation, strict addon versioning, and so strong modularity in general? Using OSGi as Roo´s core means that for develop an addon you need to first learn OSGi, and after that you need to learn Roo. It´s a big learning curve and it could became an obstacle to promote Roo´s addon development. Just my opinion, of course

          Also note that Roo comes with Bundlor support so can be used to generate OSGi bundles easily.

          @Todd

          Roo´s version is still RC3, and Roo´s core API can still change and so addon development, both Stefan and Ben have said that there will be a lot of documentation on addon development ready for 1.0 release. None of us want to work developing an addon only to find that you can´t use it in the first stable release.



          Regards, Raúl.
          Last edited by raul.arabaolaza; Nov 19th, 2009, 01:43 PM.

          Comment


          • #6
            Roo Release 1.0

            Thanks Raul,
            Any idea when the first 1.0 will be released?

            Todd

            Comment


            • #7
              Todd,

              Release dates are visible in our Jira: http://jira.springframework.org/browse/ROO. Please note that the dates noted there are subject to change as we may need slight asdjustments if GA testing reveals severe issues or the like. Furthermore we depend on releases of other projects which may affect our release schedule.

              -Stefan

              Comment


              • #8
                Create Spring Roo Plugin

                roo> project --topLevelPackage com.mycompany.myproject.roo.addon --template ROO_ADDON_SIMPLE

                go to src/main/java/com/mycompany/myproject/roo/addon
                and implement your Commands

                roo> perform assembly

                you plugin is ready :-)

                Do not call 'perform eclipse' since Eclipse now has decent plugin for Maven and no additional artifacts are need to be generated by Roo.

                Comment


                • #9
                  OK, I found this after doing a mvn eclipse:clean eclipse:eclipse.
                  Get real weird error messages about failing to weave aspects.

                  Comment


                  • #10
                    @ScopeDevelopmentShell doesn't exist for 1.1 head in org.springframework.roo.support.lifecycle.ScopeDev elopmentShell

                    What are we supposed to annotate the command class with now?

                    Comment


                    • #11
                      I've given up trying to get a simple addon to work. There are too many issues:
                      - no guide
                      - no samples for 1.1, 1.02 samples don't compile in 1.1
                      - pom created doesn't contain dependencies for shell and support
                      - dependencies for shell and support + any others need to be installed manually in maven?
                      - perform eclipse results in unusable project
                      - install addon expects zip, but perform assembly only creates jar
                      - install addon expects url, local artifacts don't seem to get picked up even using file://
                      - addon jar name is 'addon' not project name?
                      - addon install silently fails:
                      roo> addon install --url file://d:/workspace-roo/addondemo/target/addon-0.1.0-SN
                      APSHOT.zip
                      Downloading file://d:/workspace-roo/addondemo/target/addon-0.1.0-SNAPSHOT.zip
                      d
                      roo> addon list
                      Add-ons dir..: C:\Program Files\spring-roo-1.0.2.RELEASE\add-ons
                      - roo.log does not show a failure reason (I think it found the file since it takes a while to fail).

                      Comment


                      • #12
                        Yeah, there is a related ticket here: http://jira.springframework.org/browse/ROO-788

                        Feel free to vote there.

                        Comment


                        • #13
                          FYI, we attached a patch and add-on installation guide to ROO-788

                          HTH

                          Comment


                          • #14
                            Roo addons howto or any documentation?

                            Originally posted by whyBish View Post
                            I've given up trying to get a simple addon to work. There are too many issues:
                            - no guide
                            - no samples for 1.1, 1.02 samples don't compile in 1.1
                            - pom created doesn't contain dependencies for shell and support
                            - dependencies for shell and support + any others need to be installed manually in maven?
                            - perform eclipse results in unusable project
                            - install addon expects zip, but perform assembly only creates jar
                            - install addon expects url, local artifacts don't seem to get picked up even using file://
                            - addon jar name is 'addon' not project name?
                            - addon install silently fails:
                            roo> addon install --url file://d:/workspace-roo/addondemo/target/addon-0.1.0-SN
                            APSHOT.zip
                            Downloading file://d:/workspace-roo/addondemo/target/addon-0.1.0-SNAPSHOT.zip
                            d
                            roo> addon list
                            Add-ons dir..: C:\Program Files\spring-roo-1.0.2.RELEASE\add-ons
                            - roo.log does not show a failure reason (I think it found the file since it takes a while to fail).
                            Hi there,
                            any news about Roo addons howto, manual or documentation?
                            I want to developer custom addons but with no documentation, examples or howto is hard to do. Any body can help me? thanks a lot.

                            Comment


                            • #15
                              Hi guys,

                              We are currently working on the add-on development guide. This has a high priority now for us. The first few sections are already pushed into Roo master so you can read that. All you need to do is clone the Roo Git repo and run mvn site to build it locally.

                              There are also two slide decks available for this topic:
                              http://www.slideshare.net/schmidtste...ne2010addondev
                              http://www.slideshare.net/benalexau/...ical-deep-dive

                              Finally, depending on the add-on you want to write, I'd encourage you to take a look at the sources of the following core add-ons:

                              addon-create - a typical simple add-on with commands and operations
                              addon-tostring - a simple ITD-providing add-on with trigger annotation
                              addon-json - a ‘classic’ add-on with commands, operations, ITD & trigger annotation

                              HTH,
                              Stefan

                              Comment

                              Working...
                              X