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

x33g5p2x  于2022-01-25 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(115)

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

Metadata.setVersioning介绍

[英]Set versioning information for the artifact.
[中]设置工件的版本控制信息。

代码示例

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

protected static Metadata createMetadata( Artifact artifact, Versioning versioning )
{
  Metadata metadata = new Metadata();
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  metadata.setVersion( artifact.getVersion() );
  metadata.setVersioning( versioning );
  return metadata;
}

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

lastUpdated = versioning.getLastUpdated();
metadata.setVersioning( 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

m.setVersioning( new Versioning() );

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

private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
{
  Snapshot snapshot = new Snapshot();
  snapshot.setLocalCopy( true );
  Versioning versioning = new Versioning();
  versioning.setSnapshot( snapshot );
  Metadata metadata = new Metadata();
  metadata.setVersioning( versioning );
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  metadata.setVersion( artifact.getBaseVersion() );
  if ( !legacyFormat )
  {
    metadata.setModelVersion( "1.1.0" );
  }
  return metadata;
}

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

metadata.setVersioning( parseVersioning( parser, strict ) );

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

setVersioning( v );
changed = true;

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

/**
 * add/replace snapshot to the in-memory metadata instance
 *
 * @param metadata
 * @return
 * @throws MetadataException
 */
public boolean perform( Metadata metadata )
  throws MetadataException
{
  if ( metadata == null )
  {
    return false;
  }
  Versioning vs = metadata.getVersioning();
  if ( vs == null )
  {
    vs = new Versioning();
    metadata.setVersioning( vs );
  }
  return updateSnapshot( metadata );
}

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

versioning.addSnapshotVersion(snapshotVersion);
metadata.setVersioning(versioning);

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

versioning.addSnapshotVersion(snapshotVersion);
metadata.setVersioning(versioning);

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

lastUpdated = versioning.getLastUpdated();
metadata.setVersioning( versioning );

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

gaMd.setVersioning( new Versioning() );

代码示例来源: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: 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/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: org.sonatype.nexus/nexus-proxy

private static void replace( final Metadata metadata, final Metadata newMetadata )
{
  if ( metadata == null || newMetadata == null )
  {
    return;
  }
  metadata.setArtifactId( newMetadata.getArtifactId() );
  metadata.setGroupId( newMetadata.getGroupId() );
  metadata.setModelEncoding( newMetadata.getModelEncoding() );
  metadata.setModelVersion( newMetadata.getModelVersion() );
  metadata.setPlugins( newMetadata.getPlugins() );
  metadata.setVersion( newMetadata.getVersion() );
  metadata.setVersioning( newMetadata.getVersioning() );
}

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

private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
{
  Snapshot snapshot = new Snapshot();
  snapshot.setLocalCopy( true );
  Versioning versioning = new Versioning();
  versioning.setSnapshot( snapshot );
  Metadata metadata = new Metadata();
  metadata.setVersioning( versioning );
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  metadata.setVersion( artifact.getBaseVersion() );
  if ( !legacyFormat )
  {
    metadata.setModelVersion( "1.1.0" );
  }
  return metadata;
}

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

gavMd.setVersioning( new Versioning() );

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

private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
{
  Snapshot snapshot = new Snapshot();
  snapshot.setLocalCopy( true );
  Versioning versioning = new Versioning();
  versioning.setSnapshot( snapshot );
  Metadata metadata = new Metadata();
  metadata.setVersioning( versioning );
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  metadata.setVersion( artifact.getBaseVersion() );
  if ( !legacyFormat )
  {
    metadata.setModelVersion( "1.1.0" );
  }
  return metadata;
}

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

private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
{
  Snapshot snapshot = new Snapshot();
  snapshot.setLocalCopy( true );
  Versioning versioning = new Versioning();
  versioning.setSnapshot( snapshot );
  Metadata metadata = new Metadata();
  metadata.setVersioning( versioning );
  metadata.setGroupId( artifact.getGroupId() );
  metadata.setArtifactId( artifact.getArtifactId() );
  metadata.setVersion( artifact.getBaseVersion() );
  if ( !legacyFormat )
  {
    metadata.setModelVersion( "1.1.0" );
  }
  return metadata;
}

相关文章