当前位置: 首页>>代码示例>>Java>>正文


Java InstallRequest类代码示例

本文整理汇总了Java中org.sonatype.aether.installation.InstallRequest的典型用法代码示例。如果您正苦于以下问题:Java InstallRequest类的具体用法?Java InstallRequest怎么用?Java InstallRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InstallRequest类属于org.sonatype.aether.installation包,在下文中一共展示了InstallRequest类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: publishArtifacts

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
@Override
protected void publishArtifacts(Collection<Artifact> artifacts, RepositorySystem repositorySystem, RepositorySystemSession session) throws InstallationException {
    InstallRequest request = new InstallRequest();
    for (Artifact artifact : artifacts) {
        request.addArtifact(artifact);
    }
    repositorySystem.install(session, request);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:MavenInstallAction.java

示例2: newInstance

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
@Override
public MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request) {
    return null;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:SnapshotVersionManager.java

示例3: install

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
public void install( File source, Artifact artifact, ArtifactRepository localRepository )
    throws ArtifactInstallationException
{
    RepositorySystemSession session =
        LegacyLocalRepositoryManager.overlay( localRepository, legacySupport.getRepositorySession(), repoSystem );

    InstallRequest request = new InstallRequest();

    request.setTrace( DefaultRequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) );

    org.sonatype.aether.artifact.Artifact mainArtifact = RepositoryUtils.toArtifact( artifact );
    mainArtifact = mainArtifact.setFile( source );
    request.addArtifact( mainArtifact );

    for ( ArtifactMetadata metadata : artifact.getMetadataList() )
    {
        if ( metadata instanceof ProjectArtifactMetadata )
        {
            org.sonatype.aether.artifact.Artifact pomArtifact = new SubArtifact( mainArtifact, "", "pom" );
            pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) metadata ).getFile() );
            request.addArtifact( pomArtifact );
        }
        else if ( metadata instanceof SnapshotArtifactRepositoryMetadata
            || metadata instanceof ArtifactRepositoryMetadata )
        {
            // eaten, handled by repo system
        }
        else
        {
            request.addMetadata( new MetadataBridge( metadata ) );
        }
    }

    try
    {
        repoSystem.install( session, request );
    }
    catch ( InstallationException e )
    {
        throw new ArtifactInstallationException( e.getMessage(), e );
    }

    /*
     * NOTE: Not used by Maven core, only here to provide backward-compat with plugins like the Install Plugin.
     */

    if ( artifact.isSnapshot() )
    {
        Snapshot snapshot = new Snapshot();
        snapshot.setLocalCopy( true );
        artifact.addMetadata( new SnapshotArtifactRepositoryMetadata( artifact, snapshot ) );
    }

    Versioning versioning = new Versioning();
    versioning.updateTimestamp();
    versioning.addVersion( artifact.getBaseVersion() );
    if ( artifact.isRelease() )
    {
        versioning.setRelease( artifact.getBaseVersion() );
    }
    artifact.addMetadata( new ArtifactRepositoryMetadata( artifact, versioning ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:63,代码来源:DefaultArtifactInstaller.java

示例4: LocalSnapshotMetadataGenerator

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
public LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request )
{
    legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );

    snapshots = new LinkedHashMap<Object, LocalSnapshotMetadata>();
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:7,代码来源:LocalSnapshotMetadataGenerator.java

示例5: newInstance

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
public MetadataGenerator newInstance( RepositorySystemSession session, InstallRequest request )
{
    return new LocalSnapshotMetadataGenerator( session, request );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:SnapshotMetadataGeneratorFactory.java

示例6: newInstance

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
public MetadataGenerator newInstance( RepositorySystemSession session, InstallRequest request )
{
    return new VersionsMetadataGenerator( session, request );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:VersionsMetadataGeneratorFactory.java

示例7: VersionsMetadataGenerator

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
public VersionsMetadataGenerator( RepositorySystemSession session, InstallRequest request )
{
    this( session, request.getMetadata() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:VersionsMetadataGenerator.java

示例8: install

import org.sonatype.aether.installation.InstallRequest; //导入依赖的package包/类
/**
 * Installs a collection of artifacts and their accompanying metadata to the local repository.
 *
 * @param request The installation request, must not be {@code null}.
 * @return The installation result, never {@code null}.
 * @throws InstallationException If any artifact/metadata from the request could not be installed.
 */
public InstallResult install(InstallRequest request) throws InstallationException {
    return repository.install(session, request);
}
 
开发者ID:cloudbees,项目名称:bees-maven-components,代码行数:11,代码来源:RepositoryService.java


注:本文中的org.sonatype.aether.installation.InstallRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。