public void invoke(final MavenProject mavenProject, final Map<String, Object> models, final ResultCollector resultCollector) {
@SuppressWarnings("unchecked")
final Map<Object, VersionProperty> versionPropertyByObject = (Map<Object, VersionProperty>) models.get(VERSION_PROPERTIES);
for (final Map.Entry<Object, VersionProperty> entry : versionPropertyByObject.entrySet()) {
final VersionProperty versionProperty = entry.getValue();
for (final String propertyName : versionProperty.getPropertyNames()) {
if (isVersionProperty(propertyName) && !isAcceptableVersionPropertyName(propertyName)) {
final InputLocation location = modelUtil.getLocation(entry.getKey(), "version");
resultCollector.addViolation(mavenProject, this, "Version property names must use '.version', not '-version': '" + propertyName + "'",
location);
}