當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。