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

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

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

Versioning.updateTimestamp介绍

暂无

代码示例

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

protected static Versioning createVersioning( Snapshot snapshot )
{
  Versioning versioning = new Versioning();
  versioning.setSnapshot( snapshot );
  versioning.updateTimestamp();
  return versioning;
}

代码示例来源: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

@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

@Override
protected void merge( Metadata recessive )
  metadata.getVersioning().updateTimestamp();

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

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

代码示例来源:origin: io.takari.maven.plugins/takari-lifecycle-plugin

@Override
protected void executeMojo() throws MojoExecutionException {
 Artifact projectArtifact = project.getArtifact();
 Versioning versioning = new Versioning();
 versioning.setLatest(projectArtifact.getVersion());
 versioning.updateTimestamp();
 ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata(projectArtifact, versioning);
 projectArtifact.addMetadata(metadata);
 GroupRepositoryMetadata groupMetadata = new GroupRepositoryMetadata(project.getGroupId());
 groupMetadata.addPluginMapping(getGoalPrefix(), project.getArtifactId(), project.getName());
 projectArtifact.addMetadata(groupMetadata);
}

代码示例来源:origin: takari/takari-lifecycle

@Override
protected void executeMojo() throws MojoExecutionException {
 Artifact projectArtifact = project.getArtifact();
 Versioning versioning = new Versioning();
 versioning.setLatest(projectArtifact.getVersion());
 versioning.updateTimestamp();
 ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata(projectArtifact, versioning);
 projectArtifact.addMetadata(metadata);
 GroupRepositoryMetadata groupMetadata = new GroupRepositoryMetadata(project.getGroupId());
 groupMetadata.addPluginMapping(getGoalPrefix(), project.getArtifactId(), project.getName());
 projectArtifact.addMetadata(groupMetadata);
}

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

/** {@inheritDoc} */
public void execute()
  throws MojoExecutionException
{
  if ( skip )
  {
    getLog().warn( "Execution skipped" );
    return;
  }
  Artifact projectArtifact = project.getArtifact();
  Versioning versioning = new Versioning();
  versioning.setLatest( projectArtifact.getVersion() );
  versioning.updateTimestamp();
  ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( projectArtifact, versioning );
  projectArtifact.addMetadata( metadata );
  GroupRepositoryMetadata groupMetadata = new GroupRepositoryMetadata( project.getGroupId() );
  groupMetadata.addPluginMapping( getGoalPrefix(), project.getArtifactId(), project.getName() );
  projectArtifact.addMetadata( groupMetadata );
}

代码示例来源: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: 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.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: org.apache.maven/maven-aether-provider

@Override
protected void merge( Metadata recessive )
  metadata.getVersioning().updateTimestamp();

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

@Override
protected void merge( Metadata recessive )
  metadata.getVersioning().updateTimestamp();

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

@Override
protected void merge( Metadata recessive )
  metadata.getVersioning().updateTimestamp();

相关文章