[ 
https://jira.codehaus.org/browse/MECLIPSE-731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308034#comment-308034
 ] 

Glen Mazza commented on MECLIPSE-731:
-------------------------------------

Hi Olivier, yes, I should probably do a .gitignore myself for the target folder 
at least.  Still, mvn eclipse:clean is not doing what eclipse:help says it's 
supposed to be doing, and if I can avoid needing to explain creating the 
.gitignore/.svnignore files when writing my tutorials that would be cool.  :)

BTW, I don't think this has anything to do with MECLIPSE-71, as that covered 
version 2.2 of the Maven Eclipse Plugin (MEP), and MEP 2.8 runs fine--it's only 
2.9 where this problem occurs.  In MECLIPSE-71, the comments indicated that the 
single file in .settings that eclipse:eclipse creates is supposed to be 
deleted, and then the directory deleted if .settings is then empty (which it 
nearly always is).  All the user in MECLIPSE-71 had asked for was a simple 
configuration flag to suppress deletion of the ./settings folder when he runs 
mvn eclipse:clean.  But in his last comment, he even agreed that he didn't need 
to have the file deleted, i.e., really no patch needed to be applied.

Using MEP 2.8: (good)

after eclipse:eclipse:

gmazza@gmazza-work:/media/work1/blog-samples/web_service_tutorial$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    ../.metadata/
#    client/.classpath
#    client/.project
#    client/.settings/
#    service/.classpath
#    service/.project
#    service/.settings/
#    service/target/
#    war/.classpath
#    war/.project
#    war/.settings/

after eclipse:clean:  (all good)

#   (use "git add <file>..." to include in what will be committed)
#
#    ../.metadata/


Using MEP 2.9:  (buggy?)
-----------------------

git status after mvn eclipse:eclipse:

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    ../.metadata/
#    client/.classpath
#    client/.project
#    client/.settings/
#    service/.classpath
#    service/.project
#    service/.settings/
#    service/target/
#    war/.classpath
#    war/.project
#    war/.settings/

git status after mvn eclipse:clean (bad)

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    ../.metadata/
#    client/.settings/
#    service/.settings/
#    service/target/
#    war/.settings/  

(Incidentally, the lone created by mvn eclipse:eclipse in .settings is called 
"org.eclipse.jdt.core.prefs" and is 203 bytes in both MEP 2.8 and MEP 2.9)

Was there a JIRA item between MEP 2.8 and 2.9 asking for the .settings folders 
to be retained?  I couldn't find anything.  If there's isn't, then it's just a 
simple matter of going back to deleting the .settings folder again in MEP 2.9.  
If there was (and you wish to keep that functionality), then eclipse:help 
should be updated to state the mvn eclipse:clean doesn't delete the .settings 
folder (and I can rely on .gitignore instead).  That's it!
                
> 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