Although IntelliJ IDEA has en excellent Maven integration, it doesn not recognize file references or file links in the output of Maven commands. One such generator of file links is checkstyle which generates an output like this:
π Bildschirmfoto 2015-06-01 um 22.04.53
Now our live would be a lot easier, if we could just click on the message to fix the issue. Luckily, with a litte hack, this is possible: IntelliJ provides a possibility to define custom output filters for βExternal Toolsβ. Therefore navigate to βPreferences > Tools > External Toolsβ. Add a new one with βmvnβ as command and βvalidateβ or whatever triggers checkstyle as parameter.
π Bildschirmfoto 2015-06-01 um 22.04.05
Then click on βOutput Filtersβ and a a Filter with an arbitrary name and β$FILE_PATH$:$LINE$(:$COLUMN$)?.*β as Regular Expression.
π Bildschirmfoto 2015-06-01 um 22.05.31
If you now choose βTools -> External Tools -> Checkstyleβ Maven will run again producing a nicely linked output:
π Bildschirmfoto 2015-06-01 um 22.05.59
| Reference: | Highlighting Checkstyle Links using Maven and IntelliJ IDEA from our JCG partner Andreas Haufler at the Andyβs Software Engineering Corner blog. |
Thank you!
We will contact you soon.
Andreas HauflerJune 4th, 2015Last Updated: June 3rd, 2015

This site uses Akismet to reduce spam. Learn how your comment data is processed.
Does Eclipse also have this feature?