This is starting to be quite an annoying workaround, as if you have a lot of Maven build configurations and like the ability for them all to default to the same runner settings, you'd now have to duplicate the "real" setup you want in each configuration, and have the default in the project settings dialog just be for the "dummy" values so that IDEA knows that it shouldn't treat referencing that property as an error. (The only way I tested using it was in a maven-help-plugin evaluate goal, but perhaps it works when using it in other ways?) In order to be able to use the dynamically-set value, in my specific build configuration I unchecked the "Use project settings" box and removed the dummy property, as in this screenshot: However, I found in my testing that since IDEA was passing the values as properties to Maven, they weren't getting overwritten by the buildnumber-plugin and I was seeing my dummy value instead when I tried to use it. Putting values in there will let IDEA know about them so it will not highlight them in red. ![]() You can add a dummy version of your dynamic properties in Settings / Build, Execution, Development / Build Tools / Maven / Runner / Properties, like in this screenshot: There's a workaround listed in both the comments of IDEA-96358 as well as in the support post.
0 Comments
Leave a Reply. |