Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-620

Resource rules on test source paths cause implicit **/*.java exclusion

    XMLWordPrintableJSON

Details

    Description

      As soon as I add the following to my pom.xml:

      <resource>
          <directory>src/test/java</directory>
      </resource>
      

      A rule gets added to .classpath:

      <classpathentry kind="src" path="src/test/java" excluding="**/*.java"/>
      

      The excluding="*/.java" seems to appear out of nowhere causing all java files in eclipse to become unmanaged.

      Without this rule resource files in this directory are not added to the eclipse JUnit classpath (we need this since we have wicket HTML files alongside java files). I expect to be able to use this:

      <resource>
          <filtering>false</filtering>
          <directory>src/test/java</directory>
          <includes>
              <include>**</include>
          </includes>
          <excludes>
              <exclude>**/*.java</exclude>
          </excludes>
      </resource>
      

      The same way I use this (and this one DOES work!):

      <resource>
          <filtering>false</filtering>
          <directory>src/main/java</directory>
          <includes>
              <include>**</include>
          </includes>
          <excludes>
              <exclude>**/*.java</exclude>
          </excludes>
      </resource>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lhunath Maarten Billemont
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: