Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.4
-
Labels:None
-
Number of attachments :4
Description
If I write a pom file like the following:
... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <compilerId>javac</compilerId> <source>1.6</source> <target>1.6</target> <compilerArguments> <Werror /> <Xlint:all /> </compilerArguments> <showDeprecation>true</showDeprecation> </configuration> </plugin>
and if there are only warnings, then the build will not fail as intended by the compiler Argument. The reason is that in compileInProcess the exit code from javac is only considered if there are no messages. In the case of treating warnings as errors, there will be messages but no errors so the intention of the build failure is lost.
-
- JavacCompiler.java
- 16/May/11 6:46 PM
- 29 kB
- Alex Ioffe
-
- JavacCompiler.patch
- 16/May/11 6:54 PM
- 0.6 kB
- Alex Ioffe
-
Hide
- trial-maven.zip
- 13/Feb/11 7:05 AM
- 20 kB
- Martin Ackermann
-
- trial-maven/.project 0.4 kB
- trial-maven/.../org.maven.ide.eclipse.prefs 0.2 kB
- trial-maven/pom.xml 5 kB
- trial-maven/.../trial-maven site-deploy.launch 1 kB
- trial-maven/src/site/site.xml 2 kB
- trial-maven/.../.classpath 0.7 kB
- trial-maven/.../.project 0.6 kB
- trial-maven/.../org.eclipse.jdt.core.prefs 0.3 kB
- trial-maven/.../org.maven.ide.eclipse.prefs 0.2 kB
- trial-maven/.../pom.xml 0.5 kB
- trial-maven/.../pmd-ruleset.xml 15 kB
- trial-maven/trial-maven-product/.project 0.4 kB
- trial-maven/.../org.maven.ide.eclipse.prefs 0.3 kB
- trial-maven/trial-maven-product/pom.xml 2 kB
- trial-maven/.../.classpath 0.7 kB
- trial-maven/trial-maven-product/.../.project 0.6 kB
- trial-maven/.../org.eclipse.jdt.core.prefs 0.3 kB
- trial-maven/.../org.maven.ide.eclipse.prefs 0.2 kB
- trial-maven/trial-maven-product/.../pom.xml 1.0 kB
- trial-maven/.../MyClass.java 0.1 kB
- trial-maven/trial-maven-product/.../site.xml 0.6 kB
- trial-maven/.../MyClassTest.java 0.6 kB
-
Hide
- werror.zip
- 06/Jun/11 12:37 PM
- 5 kB
- Alex Ioffe
-
- werror/pom.xml 2 kB
- werror/warningsbuild/pom.xml 2 kB
- werror/src/test/.../test/WerrorTest.java 2 kB
- werror/warningsbuild/src/.../test/Main.java 0.2 kB
Issue Links
- relates to
-
MCOMPILER-179
Warnings
-