Announcement Announcement Module
No announcement yet.
Roo dependency Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo dependency

    How do I complete erase all roo dependency from my project if I so choose? The website says I can do it within 4 clicks. I haven't found any related documentation.

    I tried "remove roo" from the shell. Looks like thats not implemented yet.

  • #2

    You can use STS push in refactor to add all Rooīs generated code to your java classes, after that you have a usual java web project with no Rooīs dependencies.



    • #3
      Open the roo shell tab in STS and type

      push in itds

      This will give you a prompt with a list of all the ITD's that roo has generated. Press ok and STS will merge them into your Java code.

      You now have a plain Spring project.


      • #4
        Originally posted by dalford View Post
        Open the roo shell tab in STS and type

        push in itds
        I ran this, but my Entities still use @RooJavaBean, @RooToString, @RooEntity, while my Controllers still have @RooWebScaffold, etc.

        How can I get rid of ALL roo dependencies?


        • #5
          Iīve not tried it, but i think you can simply delete it

          Anyway the annotations retention police is code, so even if they are in your source code you donīt have any Roo dependency at runtime, that is a Roo generated webapp donīt need any Roo jar on the classpath.



          • #6
            That's right. The push in refactoring won't delete the @Roo* annotations or remove Roo's annotation JAR from your compile-time classpath, but you can do this yourself quite safely if you've push in refactored. It really is true that you have no dependency on Roo. You just need to complete the removal process.


            • #7
              Is "push in itds" reversible?

              If for any reason, due to mistake or change of mind, I would like to undo or reverse the pushed in of aspects into Java files, thus creating aspects .aj files again, is this possible?

              If not, is there any plan to support this in the future?

              Thanks for such a great tool.


              • #8
                Iīve tried something similar a time ago, i donīt know if you can "undo" the refactor from AJDT i think thereīs a "extract to ITD" feature, but itīs easy for you to make Roo usefull again.

                First remove all methods in your regular java files you want again to be on the itd

                Then if you removed the Roo* annotations add it again, annotations like RooController and so on...

                Start roo on your project, it should parse your java files and regenerate the ITDs as needed.

                A bit of manual work, but not much i think.

                BTW if you think you could need Roo in the future you should consider not using Push in, i mean, you donīt have any roo dependency on your generated App even if you use Rooīs full power, the maven build generates only standard class files, so no aspectj at all in your app, also annotations have code retention policy, so no rooīs jar in your classpath... i only can think in two scenarios were you really need to do a push in. First, your IDE donīt have AspectJ support, second, for any reason your boss donīt want you to use Roo in development time and donīt care if the final result is not Roo dependeant.

                HTH, Raúl