java - Is it possible to get maven to accept maxerrs for its compiler plugin? -
I have a project where I am responsible for fixing some errors and other errors are responsible for other errors. The number of errors is more than hundred hundred, and as I am fixing my errors, errors are accumulating. I am at that point where I see 99 errors and one of mine, and I think I Soon to that point Hunc be where he is 100. I saw this configuration for Maven using:
& lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; CompilerArgument & gt; -Xmaxerrs 1000 & lt; / CompilerArgument & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;
But no dice:
Failure to execute javac, but could not parse error: javac: Invalid flag: -Xmaxerrs 1000 Usage: Javac & lt; Options & gt; & Lt; Source files & gt;
On the command line using javac, the maxerrs flag works as expected for the list of possible options -help, but I make the jump to maven with it Can not afford to
Any thoughts?
Worked for me:
& Lt; Version & gt; 2.3.1 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Fork & gt; True & lt; / Fork & gt; & Lt; CompilerArguments & gt; & Lt; Xmaxerrs & gt 1000 & lt; / Xmaxerrs & gt; & Lt; / CompilerArguments & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;
The option has passed as expected:
$ mvn clean compile -X ... [debug] is using the compiler 'javac' [debug ] Source directory: [/ home / Pascal / projects / stackoverflow / Q3358242 / src / main / Java] [debug] classpath: [/ home / Pascal / projects / stackoverflow / Q3358242 / target / class] [debug] Output directory: Home / Pascal / Projects / Stackoverflow / Q3358242 / Target / Class [debug] Classpath: [DEBUG] / Home / Pascal / Projects / Stackes [DEBUG] / Home / Pascal / Projects / stackoverflow / Q3358242 / src / Main / Java [debug] Command line option: [debug] -d / home / Pascal / debug / source: [debug] / root / debug / Projects / stackoverflow / Q3358242 / target / sections -classpath / home / pascal / projects / stackoverflow / Q3358242 / target / classes: -sourcepath / home / pascal / projects / stackoverflow / q3358242 / src / main / java: / home / pascal / Projects / stackoverflow / Q3358242 / src / main / java / com / stackoverflow / q3358242 / App.java G-Knownarch -target 1.5 Source 1.5 -encoding UTF-8-Xmaxerrs 1000 [Info] Compilation 1 Source For file / home / Pascal / projects / stackoverflow / Q3358242 / target / classes [info] ------- ----------------------- --------------------------- ------------- [INFO] Built-in success [INFO] - ---------------------------- ---------------------- --------------------- ...
The strange part is that when I use the optional configuration, I the exact debug output < / Strong> (with the Precise same command line option ) you provide ... except that it fails due to an failure javac You should get up, you Chit as something strange.
Comments
Post a Comment