Examples of PomArtifactManager


Examples of org.sonatype.nexus.rest.artifact.PomArtifactManager

   * @return an Artifact containing the GAV information in the file
   * @throws IOException
   */
  GAV getArtifactForStorageItem(StorageFileItem item) throws IOException {
    try {
      PomArtifactManager mgr = new PomArtifactManager(
          this.nexusConfig.getTemporaryDirectory());
      mgr.storeTempPomFile(item.getInputStream());
      ArtifactCoordinate ac = mgr.getArtifactCoordinateFromTempPomFile();
      return new GAV(ac.getGroupId(), ac.getArtifactId(), ac.getVersion());
    } catch (Exception e) {
      getLogger().warn(
              "Error processing POM file for artifact usage data.", ExceptionUtils.getRootCause(e));
      return null;
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.