Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Add new option "failOnWarning". #60

Closed
wants to merge 1 commit into from

Conversation

hgschmie
Copy link
Contributor

This option causes the maven-compiler-plugin to treat warnings as errors
and fail accordingly.

Simply adds "-Werror" to the compiler command line. It may be nice to
add this to the plexus-compiler-api proper but as the sonatype repo only
has tags to 2.4 and the current plugin references 2.6 (and I have no
idea where that comes from), I went the easy route. Happy to refactor
it if wanted.

This option causes the maven-compiler-plugin to treat warnings as errors
and fail accordingly.

Simply adds "-Werror" to the compiler command line. It may be nice to
add this to the plexus-compiler-api proper but as the sonatype repo only
has tags to 2.4 and the current plugin references 2.6 (and I have no
idea where that comes from), I went the easy route. Happy to refactor
it if wanted.
@michael-o
Copy link
Member

Is this PR still relevant. If so, is there any reason not to pass to compilerArgs?

@gmcdonald gmcdonald closed this Oct 16, 2016
@hgschmie
Copy link
Contributor Author

Hm. No comment for almost a year and then one comment and closed within 8 days.

Yes, it is still relevant. As an option, I can expose this as a property with

...
   <failOnWarning>${failWarningSwitch}</failOnWarning>
...

so this can be overridden from the command line. If it gets added to , there is no way to control this dynamically from the command line.

@hgschmie
Copy link
Contributor Author

plexus compiler api 2.8.1 supports failOnWarning directly. I may simply redo this patch to leverage this.

@michael-o
Copy link
Member

michael-o commented Oct 17, 2016

Let's reopen, Can you reopen, can you provide a PR? Provide a JIRA issue also, I will merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants