Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-731

eclipse:clean not deleting ./settings folder that it creates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.10
    • None
    • None
    • Maven 3.0.3 maven-eclipse-plugin 2.9

    Description

      Hi, I use mvn eclipse:eclipse to create Eclipse projects that I subsequently import into my IDE. I then make code changes, and run mvn eclipse:clean prior to uploading my changes to GitHub.

      Problem is that eclipse:clean is not deleting the ./settings folder, giving me this list of files that I have to manually delete before I can do a simple git add . prior to committing:

      gmazza@ubuntu:/media/work1/jersey-samples-on-cxf$ git status

      1. On branch master
      2. Untracked files:
      3. (use "git add <file>..." to include in what will be committed)
        #
      4. entity-provider/.settings/
      5. exceptions/.settings/
      6. helloworld-webapp/.settings/
      7. helloworld/.settings/
      8. https-server-glassfish/.settings/
      9. jacksonjsonprovider/.settings/
      10. json-from-jaxb/.settings/
      11. jsonp/.settings/
      12. simple-console/.settings/
      13. simple-servlet/.settings/

      The Linux command I otherwise have to run to delete all these settings folders: find . -name '.settings' -type d | xargs rm -rf {} \; is quite complex and outside the capabilities of many/most Linux users (like me, I got the above command from Olivier Lamy).

      mvn eclipse:help says it's already supposed to delete the .settings folder:

      Maven Eclipse Plugin 2.9
      The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath
      and the .settings folder) from a POM.

      This plugin has 13 goals:

      ...

      eclipse:clean
      Deletes the .project, .classpath, .wtpmodules files and .settings folder used
      by Eclipse.

      ...

      Apparently the deletion of the .settings folder was made to please the people who posted http://jira.codehaus.org/browse/MECLIPSE-71 – I would say theirs is minority use case (~10-15%?) though of just wanting mvn eclipse:clean to delete just some but not all of the artifacts that mvn eclipse:eclipse created; therefore some plugin configuration setting like <keepSettingsFolder>true</keepSettingsFolder> should be created with a default value of "false" to not require this explicit configuration for the most common use-case; however if backwards compatibility is a concern the default value for this setting can be set to true. Regardless, eclipse:help should be updated to inform people to put in this setting to exclude/include deletion of the ".settings" folder. Thanks!

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              gmazza Glen Mazza
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: