/*
(non-Javadoc)

@see org.eclipse.aether.util.listener.AbstractRepositoryListener#
artifactDescriptorInvalid(org.eclipse.aether.RepositoryEvent)
168702
@Override
    public void artifactDescriptorInvalid(RepositoryEvent event) {
        log.warning("Invalid artifact descriptor for " + event.getArtifact() + ": " + event.getException().getMessage());
    }
1058200
@Override
    public void artifactDeployed(RepositoryEvent event) {
        log.fine("Deployed " + event.getArtifact() + " to " + event.getRepository());
    }
352881
public static void setId(MavenArtifactDescriptor artifactDescriptor, Coordinates coordinates) {
        artifactDescriptor.setFullQualifiedName(MavenArtifactHelper.getId(coordinates));
    }
242011
private Artifact getArtifactFromMavenCoordinates(final String artifact) throws MojoFailureException {

    String[] parts = StringUtils.split(artifact, ":");

    String version;
    String packaging = null;
    String classifier = null;

    switch (parts.length) {
      case 3:
        // groupId:artifactId:version
        version = parts[2];
        break;

      case 4:
        // groupId:artifactId:packaging:version
        packaging = parts[2];
        version = parts[3];
        break;

      case 5:
        // groupId:artifactId:packaging:classifier:version
        packaging = parts[2];
        classifier = parts[3];
        version = parts[4];
        break;

      default:
        throw new MojoFailureException("Invalid artifact: " + artifact);
    }

    String groupId = parts[0];
    String artifactId = parts[1];

    return createArtifact(artifactId, groupId, version, packaging, classifier);
  }
1369488
public static String toExtensionId(String groupId, String artifactId, String classifier)
    {
        StringBuilder builder = new StringBuilder();

        builder.append(groupId);
        builder.append(':');
        builder.append(artifactId);
        if (StringUtils.isNotEmpty(classifier)) {
            builder.append(':');
            builder.append(classifier);
        }

        return builder.toString();
    }
1098398
@Override
    public void artifactDeploying(RepositoryEvent event) {
        log.finer("Deploying " + event.getArtifact() + " to " + event.getRepository());
    }
948111
public void addArtifact(final Artifact artifact) {
        if (!artifacts.contains(artifact)) {
            if (promoted) {
                artifact.setPromoted(promoted);
            }

            artifacts.add(artifact);
        }
    }
682315
public static String ceylonModuleBaseName(final String groupId, final String artifactId) {
        if (groupId == null || artifactId == null || "".equals(artifactId) || artifactId.contains(".")) {
            throw new IllegalArgumentException(" Null or empty, or '.' is not allowed in artifactId");
        }
        return groupId + GROUP_SEPARATOR +  artifactId;
    }
951772
def validateNotationUse(self, ctxt, notationName):
        
        if ctxt is None: ctxt__o = None
        else: ctxt__o = ctxt._o
        ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
        return ret
1094571
public static String findMavenUrlForRoboconf( String artifactId, String version )
	throws IOException {
		return findMavenUrl( "net.roboconf", artifactId, version, "jar" );
	}
368979
public DbArtifact getDbArtifact(final Artifact artifact) {
        final DbArtifact dbArtifact = new DbArtifact();
        dbArtifact.setGroupId(artifact.getGroupId());
        dbArtifact.setArtifactId(artifact.getArtifactId());
        dbArtifact.setVersion(artifact.getVersion());
        dbArtifact.setClassifier(artifact.getClassifier());
        dbArtifact.setType(artifact.getType());
        dbArtifact.setExtension(artifact.getExtension());
        dbArtifact.setOrigin(artifact.getOrigin());
        dbArtifact.setPromoted(artifact.isPromoted());
        dbArtifact.setLicenses(artifact.getLicenses());

        dbArtifact.setSize(artifact.getSize());
        dbArtifact.setSha256(artifact.getSha256());
        dbArtifact.setDescription(artifact.getDescription());
        dbArtifact.setDownloadUrl(artifact.getDownloadUrl());
        dbArtifact.setProvider(artifact.getProvider());
        dbArtifact.setCreatedDateTime(artifact.getCreatedDateTime());
        dbArtifact.setUpdatedDateTime(artifact.getUpdatedDateTime());

        return dbArtifact;
    }
838911
@Override
    public void metadataResolving(RepositoryEvent event) {
        log.finer("Resolving metadata " + event.getMetadata() + " from " + event.getRepository());
    }
1233275
private void checkNonCoreArtifactId(Model model) throws EnforcerRuleException
    {
        String artifactId = model.getArtifactId();
        for (String prefix : CORE_ARTIFACT_ID_PREFIXES) {
            if (artifactId.startsWith(prefix)) {
                throw new EnforcerRuleException("The [%s] artifact id prefix is reserved for XWiki Core Committers.");
            }
        }
    }
467026
protected static final org.eclipse.aether.artifact.Artifact createArtifact(Artifact artifact) {
		return new DefaultArtifact(
				artifact.getGroupId(),
				artifact.getArtifactId(),
				artifact.getClassifier(),
				artifact.getType(),
				artifact.getVersion());
	}
487669
@Override
    protected Artifact createArtifact(final ArtifactItem item) throws MojoExecutionException {
        assert item != null;
        
        if (item.getVersion() == null) {
            throw new MojoExecutionException("Unable to find artifact without version specified: " + item.getGroupId()
                + ":" + item.getArtifactId() + ":" + item.getVersion() + " in either project dependencies or in project dependencyManagement.");
        }
        
        // if version is a range get the highest available version
        if (item.getVersion().trim().startsWith("[") || item.getVersion().trim().startsWith("(") ) {
            try {
                item.setVersion(resolveVersionRange(item.getGroupId(), item.getArtifactId(), item.getType(), item.getVersion()));
            } catch (VersionRangeResolutionException e) {
                throw new MojoExecutionException("Could not get the highest version from the range: " + item.getVersion(), e);
            }
        }
        
        return resolveArtifactItem(item);
    }
250933
public List<String> getRequiresFeature(ArtifactMetadata amd) {

        // Now check we have non-null input. I would like to check for valid
        // features
        // but as these may be user created I cannot find any way to do this so
        // it
        // is important there are no typos in the requires feature list TODO ?
        List<String> requiresFeature = new ArrayList<String>();
        String requiresFeatureProp = amd.getProperty(PROP_REQUIRE_FEATURE);
        if (requiresFeatureProp == null) {
            return null;
        }
        if (requiresFeatureProp.equals("")) {
            return requiresFeature;
        } else {
            String[] features = requiresFeatureProp.split("\\,");
            for (String feature : features) {
                requiresFeature.add(feature.trim());
            }
            return requiresFeature;
        }
    }
341562
public synchronized boolean addInvalidationListener(InvalidationListener listener) {
        if (bEnableListener && listener != null) {
            eventSource.addListener(listener);
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "addInvalidationListener() cacheName=" + this.cacheName + " listener=" + eventSource.getInvalidationListenerCount());
            }
            return true;
        }
        return false;
    }