Announcement Announcement Module
No announcement yet.
Why is there no delete command? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why is there no delete command?


    if I would like to delete some roo managed artefacts I have to do it manually for some of them (e.g. Views, messages files etc).
    I read and I agree that Roo should not delete it implicitly.

    But I would like to have a corresponding --remove command option. Is this something what is planned for Roo?

    Thank you

  • #2
    Hm... no one needs this command?


    • #3
      I'm not sure what you think you need here. As you probably know Roo already deletes files that are not needed. If you delete the java source file for instance Roo deletes the corresponding itd-files automatically, likewise if you push in all the methods from these.
      The write once files, that I assume is what you want to get rid of, how is Roo supposed to know which ones you don't want to keep around? And why is write-once files the responsibility of Roo, even when it doesn't govern them?

      An automatic remove of, unused or unreferenced files for instance, is better suited for an IDE IMHO.

      If you want to remove files from the command line, also many files at once in a controlled semiautomatic way, on unix systems you only need to utilize grep and rm in another terminal window opened to your your source folders.

      So say you need to get rid of all jspx-files you'd use something like:
      find * -regex '.*\.jspx' -exec rm {} ;
      Last edited by MiB; Jan 30th, 2013, 03:49 AM.


      • #4
        Originally posted by MiB View Post
        how is Roo supposed to know which ones you don't want to keep around?
        Let's assume that there is a "entity... --remove" command.
        Then Roo should remove all files and changes it generated for this entity:

        * Controller
        * Finders
        * Views
        * Updates in menu.jspx
        * Updates in



        • #5
          I'm not sure I agree with this being a good idea warranting a delete command. I find such a command superfluous as I have the IDE and the command line for this already. I also feel Roo getting rid of things that are write once can cause too much unexpected behavior.
          But you should make a JIRA-request for this feature and see what happens.
          Last edited by MiB; Jan 29th, 2013, 07:07 AM. Reason: spelling correction


          • #6
            I would like to remove finders that I don't want anymore. I can't find out what I shall remove.
            When I try to remove related finders,menu or view roo always recreate those.


            • #7
              Found it myself!


              • #8
                We don't delete .java files apart from those managed by the database reverse engineering process.