Is there a way to hide Maven 2 “target/” folder in Eclipse 3?

前端 未结 12 975
[愿得一人]
[愿得一人] 2021-01-30 04:58

I\'m using maven 2.0.9 with Eclipse 3.3.2.

I\'m used to launching a fresh build once per day by a mvn clean install. Then, if I refresh my Eclipse project,

12条回答
  •  日久生厌
    2021-01-30 05:39

    Using Resource filter looks solve issue if you using 'mvn clean install' frequently.

    Basically it will add 'target' to and sub folders to exclude folder directly to .project file. After run this script, if you import project to eclipse, you can see the setting 'Project'->'Properties'->'Resource'->'Resource Filters'. Before this whenever I run mvn clean install, eclipse took 50% of my CPU but now it stay under 5% while build project.


    function eclipse-setup() {
         mvn eclipse:clean
         mvn eclipse:eclipse
         #maven target folders
         find . -name .project -exec sed -i.MSORG 's/<\/projectDescription>/  1314376338264<\/id> <\/name> 26
    <\/type>  org.eclipse.ui.ide.multiFilter<\/id> 1.0-name-matches-false-false-target<\/arguments> <\/matcher> <\/filter>  1314387234341<\/id> <\/name> 6<\/type>  org.eclipse.ui.ide.multiFilter<\/id> 1.0-name-matches-false-fals
    e-*.cache.html<\/arguments> <\/matcher> <\/filter> <\/filteredResources><\/projectDescription>/' {} \;
    
    }
    

提交回复
热议问题