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

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

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

Versioning.setVersions介绍

[英]Set versions available of the artifact (both releases and snapshots).
[中]设置工件的可用版本(版本和快照)。

代码示例

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

@Override
protected void merge( Metadata recessive )
{
  Versioning versioning = metadata.getVersioning();
  versioning.updateTimestamp();
  if ( recessive.getVersioning() != null )
  {
    if ( versioning.getLatest() == null )
    {
      versioning.setLatest( recessive.getVersioning().getLatest() );
    }
    if ( versioning.getRelease() == null )
    {
      versioning.setRelease( recessive.getVersioning().getRelease() );
    }
    Collection<String> versions = new LinkedHashSet<>( recessive.getVersioning().getVersions() );
    versions.addAll( versioning.getVersions() );
    versioning.setVersions( new ArrayList<>( versions ) );
  }
}

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

versioning.setVersions( versions );
while ( parser.nextTag() == XmlPullParser.START_TAG )

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

@Override
protected void merge( Metadata recessive )
{
  Versioning versioning = metadata.getVersioning();
  versioning.updateTimestamp();
  if ( recessive.getVersioning() != null )
  {
    if ( versioning.getLatest() == null )
    {
      versioning.setLatest( recessive.getVersioning().getLatest() );
    }
    if ( versioning.getRelease() == null )
    {
      versioning.setRelease( recessive.getVersioning().getRelease() );
    }
    Collection<String> versions = new LinkedHashSet<>( recessive.getVersioning().getVersions() );
    versions.addAll( versioning.getVersions() );
    versioning.setVersions( new ArrayList<>( versions ) );
  }
}

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

@Override
protected void merge( Metadata recessive )
{
  Versioning versioning = metadata.getVersioning();
  versioning.updateTimestamp();
  if ( recessive.getVersioning() != null )
  {
    if ( versioning.getLatest() == null )
    {
      versioning.setLatest( recessive.getVersioning().getLatest() );
    }
    if ( versioning.getRelease() == null )
    {
      versioning.setRelease( recessive.getVersioning().getRelease() );
    }
    Collection<String> versions = new LinkedHashSet<>( recessive.getVersioning().getVersions() );
    versions.addAll( versioning.getVersions() );
    versioning.setVersions( new ArrayList<>( versions ) );
  }
}

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

@Override
protected void merge( Metadata recessive )
{
  Versioning versioning = metadata.getVersioning();
  versioning.updateTimestamp();
  if ( recessive.getVersioning() != null )
  {
    if ( versioning.getLatest() == null )
    {
      versioning.setLatest( recessive.getVersioning().getLatest() );
    }
    if ( versioning.getRelease() == null )
    {
      versioning.setRelease( recessive.getVersioning().getRelease() );
    }
    Collection<String> versions = new LinkedHashSet<String>( recessive.getVersioning().getVersions() );
    versions.addAll( versioning.getVersions() );
    versioning.setVersions( new ArrayList<String>( versions ) );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

vs.setVersions( new ArrayList2( versions ) );

代码示例来源:origin: io.tesla.maven/maven-repository-metadata

versioning.setVersions( versions );
while ( parser.nextTag() == XmlPullParser.START_TAG )

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-repository-maven

versioning.setLatest(maven2Metadata.getBaseVersions().getLatest());
versioning.setRelease(maven2Metadata.getBaseVersions().getRelease());
versioning.setVersions(maven2Metadata.getBaseVersions().getVersions());
versioning.setLastUpdated(Constants.METADATA_DOTLESS_TIMESTAMP.print(maven2Metadata.getLastUpdated()));
result.setVersioning(versioning);

相关文章