new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver() ); new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() ); session.setDependencyGraphTransformer( transformer );
public RepositorySystemSessionWrapper(RepositorySystemSession delegate, boolean excludeSwarm) { this.delegate = delegate; this.transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver() ); this.excludeSwarm = excludeSwarm; }
private ConflictItem newConflictItem( DependencyNode parent, DependencyNode node ) throws RepositoryException { return new ConflictItem( parent, node, deriveScope( node, null ), deriveOptional( node, null ) ); }
@Override public void selectScope( ConflictContext context ) throws RepositoryException { String scope = context.getWinner().getDependency().getScope(); if ( !JavaScopes.SYSTEM.equals( scope ) ) { scope = chooseEffectiveScope( context.getItems() ); } context.setScope( scope ); }
@Override public void deriveScope( ScopeContext context ) throws RepositoryException { context.setDerivedScope( getDerivedScope( context.getParentScope(), context.getChildScope() ) ); }
@Override public void selectOptionality( ConflictContext context ) throws RepositoryException { boolean optional = chooseEffectiveOptionality( context.getItems() ); context.setOptional( optional ); }
public boolean accept( DependencyNode node, List<DependencyNode> parents ) { return context.isIncluded( node ); } };
public void pullup( int depth ) { if ( depth < minDepth ) { minDepth = depth; depth++; for ( ConflictId child : children ) { child.pullup( depth ); } } }
private static Object toKey( Artifact artifact ) { return new Key( artifact ); }
private void scopes( int parent, Dependency child ) { scopeCtx.parentScope = ( parent > 0 ) ? parentScopes.get( parent - 1 ) : null; scopeCtx.derivedScope = scopeCtx.childScope = scope( child ); }
ChainedDependencyGraphTransformer.newInstance( session.getDependencyGraphTransformer(), transformer );
/** * Gets a dependency graph transformer. This one handles scope changes * * @return */ public DependencyGraphTransformer dependencyGraphTransformer() { DependencyGraphTransformer transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver()); return new ChainedDependencyGraphTransformer(transformer, new JavaDependencyContextRefiner()); }
@Override public void selectScope( ConflictContext context ) throws RepositoryException { String scope = context.getWinner().getDependency().getScope(); if ( !JavaScopes.SYSTEM.equals( scope ) ) { scope = chooseEffectiveScope( context.getItems() ); } context.setScope( scope ); }
@Override public void deriveScope( ScopeContext context ) throws RepositoryException { context.setDerivedScope( getDerivedScope( context.getParentScope(), context.getChildScope() ) ); }
private ConflictItem newConflictItem( DependencyNode parent, DependencyNode node ) throws RepositoryException { return new ConflictItem( parent, node, deriveScope( node, null ), deriveOptional( node, null ) ); }
@Override public void selectOptionality( ConflictContext context ) throws RepositoryException { boolean optional = chooseEffectiveOptionality( context.getItems() ); context.setOptional( optional ); }
public boolean accept( DependencyNode node, List<DependencyNode> parents ) { return context.isIncluded( node ); } };
public void pullup( int depth ) { if ( depth < minDepth ) { minDepth = depth; depth++; for ( ConflictId child : children ) { child.pullup( depth ); } } }
private static Object toKey( Artifact artifact ) { return new Key( artifact ); }
/** * Gets a dependency graph transformer. This one handles scope changes * * @return */ public DependencyGraphTransformer dependencyGraphTransformer() { DependencyGraphTransformer transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver()); return new ChainedDependencyGraphTransformer(transformer, new JavaDependencyContextRefiner()); }