Results 1 to 8 of 8

Thread: Roo dependency

  1. #1
    Join Date
    Dec 2007
    Posts
    10

    Default 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. #2

    Default

    Hi,

    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.

    Regards

  3. #3
    Join Date
    Jul 2009
    Posts
    12

    Default

    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. #4
    Join Date
    Jul 2006
    Posts
    17

    Default

    Quote 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. #5

    Default

    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.

    Regards

  6. #6
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  7. #7
    Join Date
    Sep 2009
    Posts
    21

    Default 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. #8

    Default

    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

Posting Permissions

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