Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-26

Compiler plugin ignores includes / excludes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0
    • 2.0.1
    • None

    Description

      The plexus-compiler-javac component adds "-sourcepath" argument always, but I believe it shouldn't be included when the list of source files is provided, causing that javac tries to compile not included files.

      example configuration:

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                <includes>
                  <include>org/springframework/core/**</include>
                  <include>org/springframework/util/**</include>
                </includes>
                <testIncludes>
                  <include>org/springframework/core/**</include>
                  <include>org/springframework/util/**</include>
                </testIncludes>
                <testExcludes>
                  <exclude>org/springframework/util/comparator/ComparatorTests.java</exclude>
                  <exclude>org/springframework/util/ClassUtilsTests.java</exclude>
                  <exclude>org/springframework/util/ObjectUtilsTests.java</exclude>
                  <exclude>org/springframework/util/ReflectionUtilsTests.java</exclude>
                  <exclude>org/springframework/util/SerializationTestUtils.java</exclude>
                  <exclude>org/springframework/core/io/ResourceTests.java</exclude>
                </testExcludes>
              </configuration>
            </plugin>

      Attachments

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              carlos Carlos Sanchez Gonzalez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: