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 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
    • Number of attachments :
      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?

        Activity

        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
        Martin Reinhardt added a comment -

        this feature would be really helpful

        Show
        Martin Reinhardt added a comment - this feature would be really helpful

          People

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

            Dates

            • Created:
              Updated: