Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make src/main/resources/ use the "flat view" like src/main/java in Eclipse

Is there a way to make all my src/main/resources/ folders have the "flat view" instead of the "tree view"?

I am using M2Eclipse which is excluding them (excludes **). Surely there's some way to just change the view option in the preferences instead of removing that from each project? Or is there an M2Eclipse setting that removes it?

Explanations of what I mean by tree and flat views below:


  • Tree view

    v com
      v stackoverflow
        v example
            file1.xml
            file2.xml
          v weNeedToGoDeeper
              file3.xml
              file4.xml
          > someClosedFolder
    
  • Flat view

    v com.stackoverflow.example
        file1.xml
        file2.xml
    v com.stackoverflow.example.weNeedToGoDeeper
        file3.xml
        file4.xml
    > com.stackoverflow.example.someClosedFolder
    
like image 932
Captain Man Avatar asked Nov 09 '22 06:11

Captain Man


1 Answers

When you add a new Maven project, m2eclipse adds an exclusion pattern to your build path configuration. You can make the folders flat if you change that.

Project properties
  Java Build Path
    Source tab 
      src/main/resources
        Excluded
         Edit
           Delete (or modify) exclusion pattern
like image 118
tiz Avatar answered Jan 01 '23 13:01

tiz