Java 类org.apache.maven.plugin.PluginDescriptorCache 实例源码

项目:intellij-ce-playground    文件:Maven30ServerEmbedderImpl.java   
public void customizeComponents() throws RemoteException {
  // replace some plexus components
  myContainer.addComponent(getComponent(ArtifactFactory.class, "ide"), ArtifactFactory.ROLE);
  myContainer.addComponent(getComponent(ArtifactResolver.class, "ide"), ArtifactResolver.ROLE);
  myContainer.addComponent(getComponent(RepositoryMetadataManager.class, "ide"), RepositoryMetadataManager.class.getName());
  myContainer.addComponent(getComponent(PluginDescriptorCache.class, "ide"), PluginDescriptorCache.class.getName());
  myContainer.addComponent(getComponent(ModelInterpolator.class, "ide"), ModelInterpolator.class.getName());
  myContainer.addComponent(getComponent(org.apache.maven.project.interpolation.ModelInterpolator.class, "ide"),
                           org.apache.maven.project.interpolation.ModelInterpolator.ROLE);
}
项目:intellij-ce-playground    文件:Maven32ServerEmbedderImpl.java   
public void customizeComponents() throws RemoteException {
  // replace some plexus components
  myContainer.addComponent(getComponent(ArtifactFactory.class, "ide"), ArtifactFactory.ROLE);
  myContainer.addComponent(getComponent(ArtifactResolver.class, "ide"), ArtifactResolver.ROLE);
  myContainer.addComponent(getComponent(RepositoryMetadataManager.class, "ide"), RepositoryMetadataManager.class.getName());
  myContainer.addComponent(getComponent(PluginDescriptorCache.class, "ide"), PluginDescriptorCache.class.getName());
  myContainer.addComponent(getComponent(ModelInterpolator.class, "ide"), ModelInterpolator.class.getName());
  myContainer.addComponent(getComponent(org.apache.maven.project.interpolation.ModelInterpolator.class, "ide"),
                           org.apache.maven.project.interpolation.ModelInterpolator.ROLE);
}
项目:oceano    文件:DefaultMavenPluginManager.java   
public synchronized PluginDescriptor getPluginDescriptor( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
    throws PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException
{
    PluginDescriptorCache.Key cacheKey = pluginDescriptorCache.createKey( plugin, repositories, session );

    PluginDescriptor pluginDescriptor = pluginDescriptorCache.get( cacheKey );

    if ( pluginDescriptor == null )
    {
        org.sonatype.aether.artifact.Artifact artifact =
            pluginDependenciesResolver.resolve( plugin, repositories, session );

        Artifact pluginArtifact = RepositoryUtils.toArtifact( artifact );

        pluginDescriptor = extractPluginDescriptor( pluginArtifact, plugin );

        pluginDescriptor.setRequiredMavenVersion( artifact.getProperty( "requiredMavenVersion", null ) );

        pluginDescriptorCache.put( cacheKey, pluginDescriptor );
    }

    pluginDescriptor.setPlugin( plugin );

    return pluginDescriptor;
}