I am trying to fix a compiler plugin for Gradle. Gradle generates error messages of the type:
:compileJava/file/path/Main.java:52: error: cannot find symbol public static ABC abc; ^ symbol: class ABC location: class Main /file/path/Main2.java:291: error: incompatible types: com.whatever.N cannot be converted to com.another.N ... and so on
All error messages except for the first one are properly parsed with this error format string
CompilerSet errorformat= \%E%f:%l:\ error:\ %m
The problem is that Gradle prepends a target name (in this case
:compileJava) to the first error message. My question is: how do I specify that :compileJava (and maybe some other :compileTarget) strings can be optionally included at the beginning of the error message?
If I were to write a regexp in a more common format, this would look similar to: