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

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

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

Versioning.getLastUpdated介绍

[英]Get when the metadata was last updated.
[中]获取元数据上次更新的时间。

代码示例

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

private void mergeMetadata( Versions versions, Metadata source, ArtifactRepository repository )
{
  Versioning versioning = source.getVersioning();
  if ( versioning != null )
  {
    String timestamp = StringUtils.clean( versioning.getLastUpdated() );
    if ( StringUtils.isNotEmpty( versioning.getRelease() )
      && timestamp.compareTo( versions.releaseTimestamp ) > 0 )
    {
      versions.releaseVersion = versioning.getRelease();
      versions.releaseTimestamp = timestamp;
      versions.releaseRepository = repository;
    }
    if ( StringUtils.isNotEmpty( versioning.getLatest() )
      && timestamp.compareTo( versions.latestTimestamp ) > 0 )
    {
      versions.latestVersion = versioning.getLatest();
      versions.latestTimestamp = timestamp;
      versions.latestRepository = repository;
    }
    for ( String version : versioning.getVersions() )
    {
      if ( !versions.versions.containsKey( version ) )
      {
        versions.versions.put( version, repository );
      }
    }
  }
}

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

merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
  version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );

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

versioning.setSnapshot( snapshot );
versioning.setLastUpdated( snapshot.getTimestamp().replace( ".", "" ) );
lastUpdated = versioning.getLastUpdated();
lastUpdated = metadata.getVersioning().getLastUpdated();

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

if ( "null".equals( versioning.getLastUpdated() ) )
if ( "null".equals( v.getLastUpdated() ) )
if ( versioning.getLastUpdated() == null || versioning.getLastUpdated().length() == 0 )
  versioning.setLastUpdated( v.getLastUpdated() );
if ( v.getLastUpdated() == null || v.getLastUpdated().length() == 0
   || versioning.getLastUpdated().compareTo( v.getLastUpdated() ) >= 0 )
  v.setLastUpdated( versioning.getLastUpdated() );

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

String lastUpdated = metadata.getVersioning().getLastUpdated();

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

if ( versioning != null && versioningRef != null )
  String lastUpdated = versioning.getLastUpdated();
  String now = versioningRef.getLastUpdated();
  if ( lastUpdated != null && now != null && now.compareTo( lastUpdated ) < 0 )

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

if ( versioning.getLastUpdated() != null )
  serializer.startTag( NAMESPACE, "lastUpdated" ).text( versioning.getLastUpdated() ).endTag( NAMESPACE, "lastUpdated" );

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

repaired.setLastUpdated( versioning.getLastUpdated() );
repaired.setSnapshot( new Snapshot() );
repaired.getSnapshot().setLocalCopy( true );

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

protected boolean hasLastUpdatedSet( Metadata md )
  {
    return md.getVersioning() != null && StringUtils.isNotBlank( md.getVersioning().getLastUpdated() );
  }
}

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

merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
  version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );

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

merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
  version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );

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

snapshotVersion.setVersion(artifact.getVersion());
snapshotVersion.setExtension(artifact.getType());
snapshotVersion.setUpdated(versioning.getLastUpdated());
versioning.addSnapshotVersion(snapshotVersion);

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

merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
  version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );

代码示例来源:origin: com.atlassian.sdk/ap3-aether-maven-provider

merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
  version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );

代码示例来源:origin: org.apache.karaf.tooling/karaf-maven-plugin

snapshotVersion.setVersion(artifact.getVersion());
snapshotVersion.setExtension(artifact.getType());
snapshotVersion.setUpdated(versioning.getLastUpdated());
versioning.addSnapshotVersion(snapshotVersion);

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

versioning.setSnapshot( snapshot );
versioning.setLastUpdated( snapshot.getTimestamp().replace( ".", "" ) );
lastUpdated = versioning.getLastUpdated();
lastUpdated = metadata.getVersioning().getLastUpdated();

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

String lastUpdated = metadata.getVersioning().getLastUpdated();

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

String lastUpdated = metadata.getVersioning().getLastUpdated();

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

String lastUpdated = metadata.getVersioning().getLastUpdated();

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

repaired.setLastUpdated( versioning.getLastUpdated() );
Snapshot snapshot = new Snapshot();
snapshot.setLocalCopy( true );

相关文章