当前位置: 首页>>代码示例>>Java>>正文


Java MavenProject.findDependencies方法代码示例

本文整理汇总了Java中org.jetbrains.idea.maven.project.MavenProject.findDependencies方法的典型用法代码示例。如果您正苦于以下问题:Java MavenProject.findDependencies方法的具体用法?Java MavenProject.findDependencies怎么用?Java MavenProject.findDependencies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jetbrains.idea.maven.project.MavenProject的用法示例。


在下文中一共展示了MavenProject.findDependencies方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doIsValid

import org.jetbrains.idea.maven.project.MavenProject; //导入方法依赖的package包/类
@Override
protected boolean doIsValid(MavenId id, MavenProjectIndicesManager manager, ConvertContext context) {
  if (StringUtil.isEmpty(id.getGroupId())) return false;

  if (manager.hasGroupId(id.getGroupId())) return true;

      // Check if artifact was found on importing.
  MavenProject mavenProject = findMavenProject(context);
  if (mavenProject != null) {
    for (MavenArtifact artifact : mavenProject.findDependencies(id.getGroupId(), id.getArtifactId())) {
      if (artifact.isResolved()) {
        return true;
      }
    }
  }

  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:MavenArtifactCoordinatesGroupIdConverter.java

示例2: doIsValid

import org.jetbrains.idea.maven.project.MavenProject; //导入方法依赖的package包/类
@Override
protected boolean doIsValid(MavenId id, MavenProjectIndicesManager manager, ConvertContext context) {
  if (StringUtil.isEmpty(id.getGroupId()) || StringUtil.isEmpty(id.getArtifactId())) return false;
  if (manager.hasArtifactId(id.getGroupId(), id.getArtifactId())) {
    return true;
  }

  // Check if artifact was found on importing.
  MavenProject mavenProject = findMavenProject(context);
  if (mavenProject != null) {
    for (MavenArtifact artifact : mavenProject.findDependencies(id.getGroupId(), id.getArtifactId())) {
      if (artifact.isResolved()) {
        return true;
      }
    }
  }

  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:MavenArtifactCoordinatesArtifactIdConverter.java

示例3: computePathForGenExternalApklibsDir

import org.jetbrains.idea.maven.project.MavenProject; //导入方法依赖的package包/类
@Nullable
public static String computePathForGenExternalApklibsDir(@NotNull MavenId mavenId,
                                                         @NotNull MavenProject project,
                                                         @NotNull Collection<MavenProject> allProjects) {
  String path = null;
  boolean resultUnderApp = false;

  for (MavenProject p : allProjects) {
    List<MavenArtifact> dependencies = p.findDependencies(mavenId);

    if (dependencies.size() == 0) {
      dependencies = p.findDependencies(mavenId.getGroupId(), mavenId.getArtifactId());
    }

    if (dependencies.size() > 0 && containsCompileDependency(dependencies)) {
      final VirtualFile projectDir = p.getDirectoryFile();
      final boolean app = APK_PACKAGING_TYPE.equals(p.getPackaging());
      if (path == null || !resultUnderApp && app) {
        path = projectDir.getPath() + '/' + GEN_EXTERNAL_APKLIBS_DIRNAME;
        resultUnderApp = app;
      }
    }
  }
  
  if (path == null) {
    path = getGenExternalApklibDirInProject(project);
  }
  return path;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:AndroidMavenUtil.java


注:本文中的org.jetbrains.idea.maven.project.MavenProject.findDependencies方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。