Maven Eclipse Plugin
  1. Maven Eclipse Plugin
  2. MECLIPSE-712

filteredResources in Eclipse .project is not supported and discarded by the Maven 2.x Eclipse Plugin

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8
    • Fix Version/s: None
    • Component/s: Core : .project
    • Labels:
      None
    • Environment:
      Maven 3, Windows 7, Eclipse Indigo Service Release 1

      Description

      There is a beautiful way to let Eclipse ignore the target folder:

      .project
      <?xml version="1.0" encoding="UTF-8"?>
      <projectDescription>
      	...
      	<filteredResources>
      		<filter>
      			<id>1328280594689</id>
      			<name></name>
      			<type>10</type>
      			<matcher>
      				<id>org.eclipse.ui.ide.multiFilter</id>
      				<arguments>1.0-projectRelativePath-matches-true-false-target</arguments>
      			</matcher>
      		</filter>
      	</filteredResources>
      </projectDescription>
      

      Which in Eclipse means (in the Edit Resource Filter window): "Exclude all", "Folders", "not recursive", "Project Relative Path matches "target" case sensitive".

      This will cause Eclipse to completely ignore this folder and its contents.

      Problem is, after running mvn eclipse:eclipse, this section is removed from the .project file.
      It is also not possible to configure the maven eclipse plugin to add this filteredResources section.

      Maybe it could even be generated by default by the maven eclipse plugin?

      1. screenshot-1.jpg
        46 kB
        René de Bloois

        Activity

        René de Bloois created issue -
        Hide
        René de Bloois added a comment -

        This is how it looks in Eclipse.

        Show
        René de Bloois added a comment - This is how it looks in Eclipse.
        René de Bloois made changes -
        Field Original Value New Value
        Attachment screenshot-1.jpg [ 58742 ]
        Hide
        Nicolas Ternisien added a comment -

        I do agree it would be really useful! I actually don't see why everything except test-classes and classes are not filtered out by default by Maven Eclipse plugin (generating the proper filters automatically in .project file).

        Could it be somehow possible to configure everything Eclipse allows to do in .project file in the Eclipse Maven plugin (meaning: all tags), this way, we would not constantly complain about a missing feature, the integration would be really better.

        Show
        Nicolas Ternisien added a comment - I do agree it would be really useful! I actually don't see why everything except test-classes and classes are not filtered out by default by Maven Eclipse plugin (generating the proper filters automatically in .project file). Could it be somehow possible to configure everything Eclipse allows to do in .project file in the Eclipse Maven plugin (meaning: all tags), this way, we would not constantly complain about a missing feature, the integration would be really better.
        Hide
        Nicolas Ternisien added a comment -

        Any news on this?

        Thanks!

        Show
        Nicolas Ternisien added a comment - Any news on this? Thanks!
        Hide
        Yariv Amar added a comment - - edited

        fixing this can help with multi module projects in eclipse. it would be great if we the plugin supported this:

        <plugin>
        	<groupId>org.apache.maven.plugins</groupId>
        	<artifactId>maven-eclipse-plugin</artifactId>
        	<version>2.9</version>
        	<configuration>
        		<additionalConfig>
        			<filteredResources>
        				<filter>
        					<id>1376227955734</id>
        					<name></name>
        					<type>10</type>
        					<matcher>
        						<id>org.eclipse.ui.ide.multiFilter</id>
        						<arguments>1.0-name-matches-false-false-*</arguments>
        					</matcher>
        				</filter>
        			</filteredResources>
        		</additionalConfig>
        	</configuration>
        </plugin>
        

        this will make Eclipse ignore all the folders for sub-modules in the parent project.

        Show
        Yariv Amar added a comment - - edited fixing this can help with multi module projects in eclipse. it would be great if we the plugin supported this: <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-eclipse-plugin </artifactId> <version> 2.9 </version> <configuration> <additionalConfig> <filteredResources> <filter> <id> 1376227955734 </id> <name> </name> <type> 10 </type> <matcher> <id> org.eclipse.ui.ide.multiFilter </id> <arguments> 1.0-name-matches-false-false-* </arguments> </matcher> </filter> </filteredResources> </additionalConfig> </configuration> </plugin> this will make Eclipse ignore all the folders for sub-modules in the parent project.
        Hide
        Michael Reinhardt added a comment -

        this feature would be really helpful

        Show
        Michael Reinhardt added a comment - this feature would be really helpful
        Mark Thomas made changes -
        Project Import Sun Apr 05 10:00:37 UTC 2015 [ 1428228037919 ]
        Mark Thomas made changes -
        Workflow jira [ 12721098 ] Default workflow, editable Closed status [ 12750412 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 23:47:18 UTC 2015 [ 1428277638729 ]
        Mark Thomas made changes -
        Workflow jira [ 12958400 ] Default workflow, editable Closed status [ 12995295 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            René de Bloois
          • Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development