org.sonatype.aether.artifact.Artifact.isSnapshot()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中org.sonatype.aether.artifact.Artifact.isSnapshot()方法的一些代码示例,展示了Artifact.isSnapshot()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Artifact.isSnapshot()方法的具体详情如下:
包路径:org.sonatype.aether.artifact.Artifact
类名称:Artifact
方法名:isSnapshot

Artifact.isSnapshot介绍

[英]Determines whether this artifact uses a snapshot version.
[中]确定此项目是否使用快照版本。

代码示例

代码示例来源:origin: sonatype/sonatype-aether

public boolean isSnapshot()
{
  return delegate.isSnapshot();
}

代码示例来源:origin: org.eclipse.proviso/proviso-spi

public boolean isSnapshot()
{
  return delegate.isSnapshot();
}

代码示例来源:origin: sonatype/sonatype-aether

public boolean isSnapshot()
{
  return mainArtifact.isSnapshot();
}

代码示例来源:origin: org.sonatype.aether/aether-impl

private File getFile( RepositorySystemSession session, Artifact artifact, File file )
  throws ArtifactTransferException
{
  if ( artifact.isSnapshot() && !artifact.getVersion().equals( artifact.getBaseVersion() )
    && ConfigUtils.getBoolean( session, true, "aether.artifactResolver.snapshotNormalization" ) )
  {
    String name = file.getName().replace( artifact.getVersion(), artifact.getBaseVersion() );
    File dst = new File( file.getParent(), name );
    boolean copy = dst.length() != file.length() || dst.lastModified() != file.lastModified();
    if ( copy )
    {
      try
      {
        fileProcessor.copy( file, dst, null );
        dst.setLastModified( file.lastModified() );
      }
      catch ( IOException e )
      {
        throw new ArtifactTransferException( artifact, null, e );
      }
    }
    file = dst;
  }
  return file;
}

代码示例来源:origin: sonatype/sonatype-aether

private File getFile( RepositorySystemSession session, Artifact artifact, File file )
  throws ArtifactTransferException
{
  if ( artifact.isSnapshot() && !artifact.getVersion().equals( artifact.getBaseVersion() )
    && ConfigUtils.getBoolean( session, true, "aether.artifactResolver.snapshotNormalization" ) )
  {
    String name = file.getName().replace( artifact.getVersion(), artifact.getBaseVersion() );
    File dst = new File( file.getParent(), name );
    boolean copy = dst.length() != file.length() || dst.lastModified() != file.lastModified();
    if ( copy )
    {
      try
      {
        fileProcessor.copy( file, dst, null );
        dst.setLastModified( file.lastModified() );
      }
      catch ( IOException e )
      {
        throw new ArtifactTransferException( artifact, null, e );
      }
    }
    file = dst;
  }
  return file;
}

代码示例来源:origin: airlift/airship

.addArtifact(artifact);
if (artifact.isSnapshot()) {
  Preconditions.checkNotNull(snapshotsRepository, "snapshots repository uri is null");
  deployRequest.setRepository(snapshotsRepository);

代码示例来源:origin: ibinti/bugvm

final java.io.File unpackedDistDirectory = new java.io.File(unpackedDirectory, "bugvm-" + com.bugvm.gradle.BugVMPlugin.getBugVMVersion());
if (unpackedDirectory.exists() && artifact.isSnapshot()) {
  getAnt().invokeMethod("delete", new java.util.HashMap<String, Object>() {

代码示例来源:origin: org.sonatype.sisu.assembler/sisu-assembler

if ( artifact.isSnapshot() )

代码示例来源:origin: org.sonatype.aether/aether-impl

for ( RemoteRepository repo : repos )
  if ( !repo.getPolicy( artifact.isSnapshot() ).isEnabled() )
  boolean snapshot = artifact.isSnapshot();
  RepositoryPolicy policy =
    remoteRepositoryManager.getPolicy( session, group.repository, !snapshot, snapshot );

代码示例来源:origin: sonatype/sonatype-aether

for ( RemoteRepository repo : repos )
  if ( !repo.getPolicy( artifact.isSnapshot() ).isEnabled() )
  boolean snapshot = artifact.isSnapshot();
  RepositoryPolicy policy =
    remoteRepositoryManager.getPolicy( session, group.repository, !snapshot, snapshot );

相关文章