Package com.lewisd.maven.lint.model

Examples of com.lewisd.maven.lint.model.VersionProperty


  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 (propertyName.equals("version")) {
          final InputLocation location = modelUtil.getLocation(entry.getKey(), "version");
          resultCollector.addViolation(mavenProject, this, "Use '${project.version}' instead of '${version}'", location);
        }
      }
View Full Code Here


    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);
                }
View Full Code Here

TOP

Related Classes of com.lewisd.maven.lint.model.VersionProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.