org.eclipse.aether.repository.WorkspaceReader.findArtifact()方法的使用及代码示例

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

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

WorkspaceReader.findArtifact介绍

[英]Locates the specified artifact.
[中]定位指定的工件。

代码示例

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

private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
{
  /*
   * The workspace/reactor is in flux so we better not assume definitive information for any of its
   * artifacts/projects.
   */
  WorkspaceReader workspace = session.getWorkspaceReader();
  if ( workspace == null )
  {
    return true;
  }
  Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
  return workspace.findArtifact( pomArtifact ) == null;
}

代码示例来源:origin: org.eclipse.aether/aether-util

public File findArtifact( Artifact artifact )
{
  File file = null;
  for ( WorkspaceReader reader : readers )
  {
    file = reader.findArtifact( artifact );
    if ( file != null )
    {
      break;
    }
  }
  return file;
}

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

public File findArtifact( Artifact artifact )
{
  File file = null;
  for ( WorkspaceReader reader : readers )
  {
    file = reader.findArtifact( artifact );
    if ( file != null )
    {
      break;
    }
  }
  return file;
}

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

@Override
public File resolve(String groupId, String artifactId, String classifier, String extension, String version) throws IOException {
  File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version));
  return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier)) : file;
}

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

@Override
public File resolve(String groupId, String artifactId, String classifier, String extension, String version) throws IOException {
  File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version));
  return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier)) : file;
}

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

@Override
public File resolve(String groupId, String artifactId, String classifier, String extension, String version, Exception previousException) throws IOException {
  File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version));
  return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier), previousException) : file;
}

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

@Override
public File resolve(String groupId, String artifactId, String classifier, String extension, String version, Exception previousException) throws IOException {
  File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version));
  return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier), previousException) : file;
}

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

@Override
public File resolve(String url) throws IOException {
  Artifact artifact = toArtifact(url);
  File file = reactor.findArtifact(artifact);
  return file == null ? fallback.resolve(url) : file;
}

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

@Override
public File resolve(String url, Exception previousException) throws IOException {
  Artifact artifact = toArtifact(url);
  File file = reactor.findArtifact(artifact);
  return file == null ? fallback.resolve(url, previousException) : file;
}

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

@Override
public File resolve(String url, Exception previousException) throws IOException {
  Artifact artifact = toArtifact(url);
  File file = reactor.findArtifact(artifact);
  return file == null ? fallback.resolve(url, previousException) : file;
}

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

private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
{
  /*
   * The workspace/reactor is in flux so we better not assume definitive information for any of its
   * artifacts/projects.
   */
  WorkspaceReader workspace = session.getWorkspaceReader();
  if ( workspace == null )
  {
    return true;
  }
  Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
  return workspace.findArtifact( pomArtifact ) == null;
}

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

@Override
public File resolve(String url) throws IOException {
  Artifact artifact = toArtifact(url);
  File file = reactor.findArtifact(artifact);
  return file == null ? fallback.resolve(url) : file;
}

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

private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
{
  /*
   * The workspace/reactor is in flux so we better not assume definitive information for any of its
   * artifacts/projects.
   */
  WorkspaceReader workspace = session.getWorkspaceReader();
  if ( workspace == null )
  {
    return true;
  }
  Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
  return workspace.findArtifact( pomArtifact ) == null;
}

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

private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
{
  /*
   * The workspace/reactor is in flux so we better not assume definitive information for any of its
   * artifacts/projects.
   */
  WorkspaceReader workspace = session.getWorkspaceReader();
  if ( workspace == null )
  {
    return true;
  }
  Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
  return workspace.findArtifact( pomArtifact ) == null;
}

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

private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
{
  /*
   * The workspace/reactor is in flux so we better not assume definitive information for any of its
   * artifacts/projects.
   */
  WorkspaceReader workspace = session.getWorkspaceReader();
  if ( workspace == null )
  {
    return true;
  }
  Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
  return workspace.findArtifact( pomArtifact ) == null;
}

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

File file = workspace.findArtifact( artifact );
if ( file != null )

代码示例来源:origin: org.eclipse.aether/aether-impl

File file = workspace.findArtifact( artifact );
if ( file != null )

相关文章

微信公众号

最新文章

更多