I have variables in my parent POM which are set during pre-build maven plugin goals such as buildnumber:create and build-helper:parse-version. In Intellij IDEA, these variables show 'cannot resolve symbol' warnings in the IDE and the pom.xml is red (disaster!). The build still works as the goals are run every time.
Examples of such symbols which cannot be resolved are: ${parsedVersion.majorVersion} ${parsedVersion.minorVersion}
Eclipse manages to find a way round this, I believe, using a section in the pom for plugin management to execute the goals at at on configuration/increment:
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<versionRange>[1.0-beta-1,)</versionRange>
<goals>
<goal>create</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnConfiguration>true</runOnConfiguration>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
Is there any way to do the equivalent in intellij so the symbols are resolved in the editor?
Cheers