public void handle(DependencyResolutionResult event) throws Exception { log.debug("DependencyResolution result: {}", event); getBuildRecorder().recordDependencyResolutionFinished(event.getResolvedDependencies()); } }
public void handle(DependencyResolutionResult event) throws Exception { log.debug("DependencyResolution result: {}", event); getBuildRecorder().recordDependencyResolutionFinished(event.getResolvedDependencies()); } }
public void handle(DependencyResolutionResult event) throws Exception { log.debug("DependencyResolution result: {}", event); getBuildRecorder().recordDependencyResolutionFinished(event.getResolvedDependencies()); } }
public static Dependency findDependency( MavenProject project, ProjectDependenciesResolver projectDependenciesResolver, RepositorySystemSession repoSession, final String groupId, final String artifactId ) throws DependencyResolutionException { DefaultDependencyResolutionRequest request = new DefaultDependencyResolutionRequest(); request.setMavenProject(project); request.setRepositorySession(repoSession); request.setResolutionFilter(new DependencyFilter() { @Override public boolean accept(DependencyNode node, List<DependencyNode> parents) { return node.getArtifact().getArtifactId().equals(artifactId) && node.getArtifact().getGroupId().equals(groupId); } }); DependencyResolutionResult result = projectDependenciesResolver.resolve(request); List<Dependency> dependencies = result.getResolvedDependencies(); if (dependencies.isEmpty()) { return null; } return dependencies.get(0); }
private DependencyResolutionResult collectDependenciesFromReactor( DependencyResolutionException e, Collection<MavenProject> reactorProjects ) throws DependencyGraphBuilderException { DependencyResolutionResult result = e.getResult(); List<Dependency> reactorDeps = getReactorDependencies( reactorProjects, result.getUnresolvedDependencies() ); result.getUnresolvedDependencies().removeAll( reactorDeps ); Invoker.invoke( result.getResolvedDependencies(), "addAll", Collection.class, reactorDeps ); if ( !result.getUnresolvedDependencies().isEmpty() ) { throw new DependencyGraphBuilderException( "Could not resolve nor collect following dependencies: " + result.getUnresolvedDependencies(), e ); } return result; }
private DependencyResolutionResult collectDependenciesFromReactor( DependencyResolutionException e, Collection<MavenProject> reactorProjects ) throws DependencyGraphBuilderException { DependencyResolutionResult result = e.getResult(); List<Dependency> reactorDeps = getReactorDependencies( reactorProjects, result.getUnresolvedDependencies() ); result.getUnresolvedDependencies().removeAll( reactorDeps ); Invoker.invoke( result.getResolvedDependencies(), "addAll", Collection.class, reactorDeps ); if ( !result.getUnresolvedDependencies().isEmpty() ) { throw new DependencyGraphBuilderException( "Could not resolve nor collect following dependencies: " + result.getUnresolvedDependencies(), e ); } return result; }
private DependencyResolutionResult collectDependenciesFromReactor( DependencyResolutionException e, Collection<MavenProject> reactorProjects ) throws DependencyGraphBuilderException { DependencyResolutionResult result = e.getResult(); List<Dependency> reactorDeps = getReactorDependencies( reactorProjects, result.getUnresolvedDependencies() ); result.getUnresolvedDependencies().removeAll( reactorDeps ); Invoker.invoke( result.getResolvedDependencies(), "addAll", Collection.class, reactorDeps ); if ( !result.getUnresolvedDependencies().isEmpty() ) { throw new DependencyGraphBuilderException( "Could not resolve nor collect following dependencies: " + result.getUnresolvedDependencies(), e ); } return result; }
private DependencyResolutionResult collectDependenciesFromReactor( DependencyResolutionException e, Collection<MavenProject> reactorProjects ) throws DependencyGraphBuilderException { DependencyResolutionResult result = e.getResult(); List<Dependency> reactorDeps = getReactorDependencies( reactorProjects, result.getUnresolvedDependencies() ); result.getUnresolvedDependencies().removeAll( reactorDeps ); Invoker.invoke( result.getResolvedDependencies(), "addAll", Collection.class, reactorDeps ); if ( !result.getUnresolvedDependencies().isEmpty() ) { throw new DependencyGraphBuilderException( "Could not resolve nor collect following dependencies: " + result.getUnresolvedDependencies(), e ); } return result; }
List<Dependency> dependencies = result.getResolvedDependencies();
new DefaultDependencyResolutionRequest(project, reresolveSession)); for (Dependency dependency : depencencyResult.getResolvedDependencies()) { if (!dependency.getArtifact().isSnapshot()) {
root.addChild(dependenciesElt); for (Dependency dependency : result.getResolvedDependencies()) { Artifact artifact = dependency.getArtifact();