Results 1 to 8 of 8

Thread: Why is there no delete command?

  1. #1
    Join Date
    Mar 2007
    Posts
    565

    Default Why is there no delete command?

    Hi,

    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 http://forum.springsource.org/showth...eleting-entity 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. #2
    Join Date
    Mar 2007
    Posts
    565

    Default

    Hm... no one needs this command?

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

    Default

    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:
    Code:
    find * -regex '.*\.jspx' -exec rm {} ;
    Last edited by MiB; Jan 30th, 2013 at 03:49 AM.

  4. #4
    Join Date
    Mar 2007
    Posts
    565

    Default

    Quote 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 application.properties

    etc

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

    Default

    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 at 07:07 AM. Reason: spelling correction

  6. #6

    Default

    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.
    /Gunnar

  7. #7

    Default

    Found it myself!
    /Gunnar

  8. #8
    Join Date
    Dec 2005
    Posts
    935

    Default

    We don't delete .java files apart from those managed by the database reverse engineering process.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Posting Permissions

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