You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by yk <yk...@gmail.com> on 2014/03/11 14:28:36 UTC

Custom maven plugin to count compilation warnings

Hi, I'm trying to write a plugin for Maven that would count the number of
compiler warnings and act in some way if that number is not what it is
expected to be.

The question is how a custom Maven plugin could find out the number of
warnings/errors compiler produces?



--
View this message in context: http://maven.40175.n5.nabble.com/Custom-maven-plugin-to-count-compilation-warnings-tp5787921.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom maven plugin to count compilation warnings

Posted by yk <yk...@gmail.com>.
Yes, you're right here that IDE is a good place to check for warnings.
However, we have a requirement for a Maven plugin which accepts a predefined
number of warnings in code (Java/Scala, legacy code which we aren't going to
rewrite anytime soon due to the lack of time) and checks that no more
warnings were introduced since last commit.
The ideas I have in mind:
1) Custom plugin that makes calls to Java/Scala compilers and checks the
code for warnings.
2) Modified maven-compiler-plugin and maven-scala-plugin which can store
warnings and pass them to the custom plugin.
3) Custom plugin parse Maven output log looking for warnings.



--
View this message in context: http://maven.40175.n5.nabble.com/Custom-maven-plugin-to-count-compilation-warnings-tp5787921p5788093.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom maven plugin to count compilation warnings

Posted by Ron Wheeler <rw...@artifact-software.com>.
Would it not be a better use of time to get rid of the warnings?
Your IDE should point out which code includes warnings and should warn 
you when you try to check-in code that has warnings.

Ron

On 11/03/2014 9:28 AM, yk wrote:
> Hi, I'm trying to write a plugin for Maven that would count the number of
> compiler warnings and act in some way if that number is not what it is
> expected to be.
>
> The question is how a custom Maven plugin could find out the number of
> warnings/errors compiler produces?
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Custom-maven-plugin-to-count-compilation-warnings-tp5787921.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org