org.apache.maven.artifact.repository.metadata.Versioning.addVersion()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(140)

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

Versioning.addVersion介绍

[英]Method addVersion.
[中]方法addVersion。

代码示例

代码示例来源:origin: apache/maven

private ArtifactMetadata createMetadata( Artifact artifact )
{
  Versioning versioning = new Versioning();
  versioning.updateTimestamp();
  versioning.addVersion( artifact.getVersion() );
  if ( artifact.isRelease() )
  {
    versioning.setRelease( artifact.getVersion() );
  }
  return new ArtifactRepositoryMetadata( artifact, versioning );
}

代码示例来源:origin: apache/maven

private static Metadata createRepositoryMetadata( Artifact artifact )
{
  Metadata metadata = new Metadata();
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  Versioning versioning = new Versioning();
  versioning.addVersion( artifact.getBaseVersion() );
  if ( !artifact.isSnapshot() )
  {
    versioning.setRelease( artifact.getBaseVersion() );
  }
  if ( "maven-plugin".equals( artifact.getProperty( ArtifactProperties.TYPE, "" ) ) )
  {
    versioning.setLatest( artifact.getBaseVersion() );
  }
  metadata.setVersioning( versioning );
  return metadata;
}

代码示例来源:origin: apache/maven

versioning.addVersion( artifact.getBaseVersion() );
if ( artifact.isRelease() )

代码示例来源:origin: org.apache.maven/maven-aether-provider

private static Metadata createRepositoryMetadata( Artifact artifact )
{
  Metadata metadata = new Metadata();
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  Versioning versioning = new Versioning();
  versioning.addVersion( artifact.getBaseVersion() );
  if ( !artifact.isSnapshot() )
  {
    versioning.setRelease( artifact.getBaseVersion() );
  }
  if ( "maven-plugin".equals( artifact.getProperty( ArtifactProperties.TYPE, "" ) ) )
  {
    versioning.setLatest( artifact.getBaseVersion() );
  }
  metadata.setVersioning( versioning );
  return metadata;
}

代码示例来源:origin: org.apache.maven/maven-resolver-provider

private static Metadata createRepositoryMetadata( Artifact artifact )
{
  Metadata metadata = new Metadata();
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  Versioning versioning = new Versioning();
  versioning.addVersion( artifact.getBaseVersion() );
  if ( !artifact.isSnapshot() )
  {
    versioning.setRelease( artifact.getBaseVersion() );
  }
  if ( "maven-plugin".equals( artifact.getProperty( ArtifactProperties.TYPE, "" ) ) )
  {
    versioning.setLatest( artifact.getBaseVersion() );
  }
  metadata.setVersioning( versioning );
  return metadata;
}

代码示例来源:origin: io.tesla.maven/maven-aether-provider

private static Metadata createRepositoryMetadata( Artifact artifact )
{
  Metadata metadata = new Metadata();
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  Versioning versioning = new Versioning();
  versioning.addVersion( artifact.getBaseVersion() );
  if ( !artifact.isSnapshot() )
  {
    versioning.setRelease( artifact.getBaseVersion() );
  }
  if ( "maven-plugin".equals( artifact.getProperty( ArtifactProperties.TYPE, "" ) ) )
  {
    versioning.setLatest( artifact.getBaseVersion() );
  }
  metadata.setVersioning( versioning );
  return metadata;
}

代码示例来源:origin: org.apache.maven.archiva/archiva-artifact-converter

versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

代码示例来源:origin: apache/archiva

versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

代码示例来源:origin: org.apache.archiva/archiva-converter

versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

代码示例来源:origin: org.apache.archiva/archiva-artifact-converter

versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

相关文章