Glen Mazza created MECLIPSE-731:
-----------------------------------

             Summary: eclipse:clean not deleting ./settings folder that it 
creates
                 Key: MECLIPSE-731
                 URL: https://jira.codehaus.org/browse/MECLIPSE-731
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
    Affects Versions: 2.9
         Environment: Maven 3.0.3 maven-eclipse-plugin 2.9
            Reporter: Glen Mazza


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
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       entity-provider/.settings/
#       exceptions/.settings/
#       helloworld-webapp/.settings/
#       helloworld/.settings/
#       https-server-glassfish/.settings/
#       jacksonjsonprovider/.settings/
#       json-from-jaxb/.settings/
#       jsonp/.settings/
#       simple-console/.settings/
#       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!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to