Examples of GAVCoordinate


Examples of org.sonatype.nexus.util.GAVCoordinate

    URL url = getClass().getResource(path);

    // If we can not find the metadata, then bitch and return whatever we can
    if (url == null) {
      log.warn("Missing plugin project metadata: {}", path);
      return new GAVCoordinate(groupId, artifactId, UNKNOWN);
    }

    Properties props = Properties2.load(url);
    @NonNls
    GAVCoordinate gav = new GAVCoordinate(
        props.getProperty("groupId", UNKNOWN),
        props.getProperty("artifactId", UNKNOWN),
        props.getProperty("version", UNKNOWN)
    );

    // Complain if there is a mismatch between what we expect the gav to be and what it really is
    if (!groupId.equals(gav.getGroupId())) {
      log.warn("Plugin groupId mismatch; expected: {}, found: {}", groupId, gav.getGroupId()); //NON-NLS
    }
    if (!artifactId.equals(gav.getArtifactId())) {
      log.warn("Plugin artifactId mismatch; expected: {}, found: {}", artifactId, gav.getArtifactId()); //NON-NLS
    }

    return gav;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.