4

I have .java files in my source directory that don't compile yet due to some API change. I would like to fix sources one by one and it would be useful to ignore some of them to run tests.

Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
Alexandru
  • 25,070
  • 18
  • 69
  • 78

1 Answers1

11

With the maven compiler plugin and the exclude option:

  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>**/*Point*.java</exclude>
                </excludes>
            </configuration>
         </plugin>
     </plugins>
  </build>

Resources:

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Colin Hebert
  • 91,525
  • 15
  • 160
  • 151