Maven plugins configuration validation

Hello,

I often find validation errors in Maven plugins configuration.

For example this entry in the POM will show an error because stopKey and stopPort elements are not defined:

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.10</version>
                <configuration>
                    <scanIntervalSeconds>1</scanIntervalSeconds>
                </configuration>
            </plugin>

The Jetty plugin will work fine without them though. After changing version to 6.1.24 the problem disappears.

I'm wondering how does IDEA validate Maven plugin configurations. Do plugins provide a schema for their configuration for each version? Or is it just hardcoded in IDEA?

3 comments

The reason I ask is because I don't know wheter to report issues to IDEA or Maven plugins.

0

AFAIK the possible configuration elements are taken from the plugin's pom.xml   You can try by navigating to any valid configuration element (CTRL+click) and check whether the missing properties are missing in the corresponding pom.xml

0

Actually the information about possible parameters is in META-INF\maven\plugin.xml in the plugin jar. I found that by control-clicking on the valid configuration element. Thanks!

0

Please sign in to leave a comment.