Maven compiler warnings and errors in Eclipse

I already asked the opposite question , but now I love Maven and would like to set compiler warnings in my pom, which are actually mapped to eclipse, allowing the eclipse to mark the β€œwrong” warning lines.

I think (?) Maven already sets a check mark to overwrite the default alerts for each project, but then just copies the default values ​​to the settings that are not used by default. Then it should not be a big hash for the plugin, for example. set "Member may be static" for warning?

What is a recording plugin? I can not compiler plugin have any options for this.

+4
source share
1 answer

Not sure if I fully understand your question. For the warning bit, you can override it with the showWarnings object in the maven compiler plugin:

  <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>${project.build.sourceEncoding}</encoding> <showDeprecation>true</showDeprecation> <showWarnings>true</showWarnings> </configuration> </plugin> 
0
source

Source: https://habr.com/ru/post/1390936/


All Articles