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.

1 Answer 1

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:

Sign up to request clarification or add additional context in comments.

2 Comments

hi, i tried this.The exclude filter is not working.Suggest plz what could have gone wrong
In fairness this answer is now three years old, a lot of things happened since.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.