Hi All,
I'm using maven analyze projects with Error Prone but noticed that the build fails after one error is found and doesn't continue analyzing all the files. For example, I have a test project with multiple files all containing the exact same error (details below) but the build quits after just finding one. I have also tried mvn compile options (-fae,--fail-at-end and -fn,--fail-never) but still running into the same issue where it quits after one file. Is this expected and/or does anyone know how to use Maven to analyze every file in the project even after an EP error?
Output: $ mvn -q compile
/home/.../src/main/java/ShortSet.java:8: error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method; its type int is not compatible with its collection's type argument Short
s.remove(i - 1);
^
(see
http://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project tool-recommender-bot-test: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException* The project has three files- ShortSet.java, LongSet.java, and ShortList.java all with the exact same error from one of the examples on the website.
EX)
import java.util.*;
public class ShortSet {
public static void main (String[] args) {
Set<Short> s = new HashSet<Short>();
for (short i = 0; i < 100; i++) {
s.add(i);
s.remove(i - 1);
}
System.out.println(s.size());
}
}