作者:孤独秀风_328 | 来源:互联网 | 2023-09-15 21:04
本文整理了Java中org.jboss.forge.addon.dependencies.builder.DependencyBuilder.setCoordinate()
本文整理了Java中org.jboss.forge.addon.dependencies.builder.DependencyBuilder.setCoordinate()
方法的一些代码示例,展示了DependencyBuilder.setCoordinate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DependencyBuilder.setCoordinate()
方法的具体详情如下:
包路径:org.jboss.forge.addon.dependencies.builder.DependencyBuilder
类名称:DependencyBuilder
方法名:setCoordinate
DependencyBuilder.setCoordinate介绍
暂无
代码示例
代码示例来源:origin: org.jboss.forge.addon/maven-impl
@Override
public List resolveVersions(DependencyQuery query)
{
VersionRangeResult r = getVersions(query);
List result = new ArrayList<>();
Predicate filter = query.getDependencyFilter();
for (Version v : r.getVersions())
{
CoordinateBuilder coord = CoordinateBuilder.create(query.getCoordinate()).setVersion(v.toString());
DependencyBuilder versiOnedDep= DependencyBuilder.create().setCoordinate(coord);
if (filter == null || filter.accept(versionedDep))
{
result.add(coord);
}
}
return result;
}
代码示例来源:origin: org.jboss.forge.addon/database-tools-impl
@Override
public Result execute(UIExecutionContext context) throws Exception
{
DatabaseType chosenDbType = dbType.getValue();
String chosenScope = scope.getValue();
String chosenVersion = version.getValue();
if (chosenVersion == null)
{
List versiOns= getVersionsFor(chosenDbType);
if (!versions.isEmpty())
{
chosenVersion = versions.get(versions.size() - 1);
}
}
if (chosenVersion == null)
{
return Results.fail("No version specified or found for " + chosenDbType.getDriverCoordinate());
}
Project project = getSelectedProject(context);
DependencyBuilder dependency = DependencyBuilder.create()
.setCoordinate(chosenDbType.getDriverCoordinate())
.setVersion(chosenVersion)
.setScopeType(chosenScope);
DependencyFacet dependencyFacet = project.getFacet(DependencyFacet.class);
dependencyFacet.addDirectDependency(dependency);
return Results.success("JDBC Driver Dependency " + dependency + " installed");
}
代码示例来源:origin: org.jboss.forge.addon/dependencies-api
public static DependencyBuilder create(final Dependency dep)
{
DependencyBuilder builder = new DependencyBuilder();
builder.setCoordinate(dep.getCoordinate());
builder.setScopeType(dep.getScopeType());
builder.setArtifact(dep.getArtifact());
builder.setExcludedCoordinates(dep.getExcludedCoordinates());
builder.setOptional(dep.isOptional());
return builder;
}
代码示例来源:origin: org.jboss.forge.addon/maven-impl-projects
.setCoordinate(versioned)
.addExecution(execution)
.addPluginDependency(DependencyBuilder.create().setCoordinate(aptDependency));
facet.addPlugin(processorPlugin);
DependencyBuilder.create().setCoordinate(aptDependency).setScopeType("provided"));