blob: 4cf2f2c4bb08373dceff85fd93dc3fd423c5d841 [file] [log] [blame]
Stuart McCullochacef9482009-09-02 18:33:41 +00001package org.apache.maven.shared.dependency.tree;
2
Stuart McCullochd98b02e2011-06-28 23:20:37 +00003
Stuart McCullochacef9482009-09-02 18:33:41 +00004/*
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 */
22
23import java.util.Collection;
24import java.util.Collections;
25import java.util.HashMap;
26import java.util.IdentityHashMap;
27import java.util.Iterator;
28import java.util.Map;
29import java.util.Stack;
30
31import org.apache.maven.artifact.Artifact;
32import org.apache.maven.artifact.resolver.ResolutionListener;
33import org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt;
34import org.apache.maven.artifact.versioning.VersionRange;
35import org.apache.maven.shared.dependency.tree.traversal.CollectingDependencyNodeVisitor;
36import org.codehaus.plexus.logging.Logger;
37
Stuart McCullochd98b02e2011-06-28 23:20:37 +000038
Stuart McCullochacef9482009-09-02 18:33:41 +000039/**
40 * An artifact resolution listener that constructs a dependency tree.
41 *
42 * @author Edwin Punzalan
43 * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
44 * @version $Id: DependencyTreeResolutionListener.java 661727 2008-05-30 14:21:49Z bentmann $
45 */
46public class DependencyTreeResolutionListener implements ResolutionListener, ResolutionListenerForDepMgmt
47{
48 // fields -----------------------------------------------------------------
Stuart McCullochd98b02e2011-06-28 23:20:37 +000049
Stuart McCullochacef9482009-09-02 18:33:41 +000050 /**
51 * The log to write debug messages to.
52 */
53 private final Logger logger;
54
55 /**
56 * The parent dependency nodes of the current dependency node.
57 */
58 private final Stack parentNodes;
59
60 /**
61 * A map of dependency nodes by their attached artifact.
62 */
63 private final Map nodesByArtifact;
64
65 /**
66 * The root dependency node of the computed dependency tree.
67 */
68 private DependencyNode rootNode;
69
70 /**
71 * The dependency node currently being processed by this listener.
72 */
73 private DependencyNode currentNode;
Stuart McCullochd98b02e2011-06-28 23:20:37 +000074
Stuart McCullochacef9482009-09-02 18:33:41 +000075 /**
76 * Map &lt; String replacementId, String premanaged version >
77 */
78 private Map managedVersions = new HashMap();
79
80 /**
81 * Map &lt; String replacementId, String premanaged scope >
82 */
83 private Map managedScopes = new HashMap();
84
Stuart McCullochd98b02e2011-06-28 23:20:37 +000085
Stuart McCullochacef9482009-09-02 18:33:41 +000086 // constructors -----------------------------------------------------------
87
88 /**
89 * Creates a new dependency tree resolution listener that writes to the specified log.
90 *
91 * @param logger
92 * the log to write debug messages to
93 */
94 public DependencyTreeResolutionListener( Logger logger )
95 {
96 this.logger = logger;
Stuart McCullochd98b02e2011-06-28 23:20:37 +000097
Stuart McCullochacef9482009-09-02 18:33:41 +000098 parentNodes = new Stack();
99 nodesByArtifact = new IdentityHashMap();
100 rootNode = null;
101 currentNode = null;
102 }
103
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000104
Stuart McCullochacef9482009-09-02 18:33:41 +0000105 // ResolutionListener methods ---------------------------------------------
106
107 /**
108 * {@inheritDoc}
109 */
110 public void testArtifact( Artifact artifact )
111 {
112 log( "testArtifact: artifact=" + artifact );
113 }
114
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000115
Stuart McCullochacef9482009-09-02 18:33:41 +0000116 /**
117 * {@inheritDoc}
118 */
119 public void startProcessChildren( Artifact artifact )
120 {
121 log( "startProcessChildren: artifact=" + artifact );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000122
Stuart McCullochacef9482009-09-02 18:33:41 +0000123 if ( !currentNode.getArtifact().equals( artifact ) )
124 {
125 throw new IllegalStateException( "Artifact was expected to be " + currentNode.getArtifact() + " but was "
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000126 + artifact );
Stuart McCullochacef9482009-09-02 18:33:41 +0000127 }
128
129 parentNodes.push( currentNode );
130 }
131
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000132
Stuart McCullochacef9482009-09-02 18:33:41 +0000133 /**
134 * {@inheritDoc}
135 */
136 public void endProcessChildren( Artifact artifact )
137 {
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000138 DependencyNode node = ( DependencyNode ) parentNodes.pop();
Stuart McCullochacef9482009-09-02 18:33:41 +0000139
140 log( "endProcessChildren: artifact=" + artifact );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000141
Stuart McCullochacef9482009-09-02 18:33:41 +0000142 if ( node == null )
143 {
144 throw new IllegalStateException( "Parent dependency node was null" );
145 }
146
147 if ( !node.getArtifact().equals( artifact ) )
148 {
149 throw new IllegalStateException( "Parent dependency node artifact was expected to be " + node.getArtifact()
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000150 + " but was " + artifact );
Stuart McCullochacef9482009-09-02 18:33:41 +0000151 }
152 }
153
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000154
Stuart McCullochacef9482009-09-02 18:33:41 +0000155 /**
156 * {@inheritDoc}
157 */
158 public void includeArtifact( Artifact artifact )
159 {
160 log( "includeArtifact: artifact=" + artifact );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000161
Stuart McCullochacef9482009-09-02 18:33:41 +0000162 DependencyNode existingNode = getNode( artifact );
163
164 /*
165 * Ignore duplicate includeArtifact calls since omitForNearer can be called prior to includeArtifact on the same
166 * artifact, and we don't wish to include it twice.
167 */
168 if ( existingNode == null && isCurrentNodeIncluded() )
169 {
170 DependencyNode node = addNode( artifact );
171
172 /*
173 * Add the dependency management information cached in any prior manageArtifact calls, since includeArtifact
174 * is always called after manageArtifact.
175 */
176 flushDependencyManagement( node );
177 }
178 }
179
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000180
Stuart McCullochacef9482009-09-02 18:33:41 +0000181 /**
182 * {@inheritDoc}
183 */
184 public void omitForNearer( Artifact omitted, Artifact kept )
185 {
186 log( "omitForNearer: omitted=" + omitted + " kept=" + kept );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000187
Stuart McCullochacef9482009-09-02 18:33:41 +0000188 if ( !omitted.getDependencyConflictId().equals( kept.getDependencyConflictId() ) )
189 {
190 throw new IllegalArgumentException( "Omitted artifact dependency conflict id "
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000191 + omitted.getDependencyConflictId() + " differs from kept artifact dependency conflict id "
192 + kept.getDependencyConflictId() );
Stuart McCullochacef9482009-09-02 18:33:41 +0000193 }
194
195 if ( isCurrentNodeIncluded() )
196 {
197 DependencyNode omittedNode = getNode( omitted );
198
199 if ( omittedNode != null )
200 {
201 removeNode( omitted );
202 }
203 else
204 {
205 omittedNode = createNode( omitted );
206
207 currentNode = omittedNode;
208 }
209
210 omittedNode.omitForConflict( kept );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000211
Stuart McCullochacef9482009-09-02 18:33:41 +0000212 /*
213 * Add the dependency management information cached in any prior manageArtifact calls, since omitForNearer
214 * is always called after manageArtifact.
215 */
216 flushDependencyManagement( omittedNode );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000217
Stuart McCullochacef9482009-09-02 18:33:41 +0000218 DependencyNode keptNode = getNode( kept );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000219
Stuart McCullochacef9482009-09-02 18:33:41 +0000220 if ( keptNode == null )
221 {
222 addNode( kept );
223 }
224 }
225 }
226
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000227
Stuart McCullochacef9482009-09-02 18:33:41 +0000228 /**
229 * {@inheritDoc}
230 */
231 public void updateScope( Artifact artifact, String scope )
232 {
233 log( "updateScope: artifact=" + artifact + ", scope=" + scope );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000234
Stuart McCullochacef9482009-09-02 18:33:41 +0000235 DependencyNode node = getNode( artifact );
236
237 if ( node == null )
238 {
239 // updateScope events can be received prior to includeArtifact events
240 node = addNode( artifact );
241 }
242
243 node.setOriginalScope( artifact.getScope() );
244 }
245
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000246
Stuart McCullochacef9482009-09-02 18:33:41 +0000247 /**
248 * {@inheritDoc}
249 */
250 public void manageArtifact( Artifact artifact, Artifact replacement )
251 {
252 // TODO: remove when ResolutionListenerForDepMgmt merged into ResolutionListener
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000253
Stuart McCullochacef9482009-09-02 18:33:41 +0000254 log( "manageArtifact: artifact=" + artifact + ", replacement=" + replacement );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000255
Stuart McCullochacef9482009-09-02 18:33:41 +0000256 if ( replacement.getVersion() != null )
257 {
258 manageArtifactVersion( artifact, replacement );
259 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000260
Stuart McCullochacef9482009-09-02 18:33:41 +0000261 if ( replacement.getScope() != null )
262 {
263 manageArtifactScope( artifact, replacement );
264 }
265 }
266
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000267
Stuart McCullochacef9482009-09-02 18:33:41 +0000268 /**
269 * {@inheritDoc}
270 */
271 public void omitForCycle( Artifact artifact )
272 {
273 log( "omitForCycle: artifact=" + artifact );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000274
Stuart McCullochacef9482009-09-02 18:33:41 +0000275 if ( isCurrentNodeIncluded() )
276 {
277 DependencyNode node = createNode( artifact );
278
279 node.omitForCycle();
280 }
281 }
282
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000283
Stuart McCullochacef9482009-09-02 18:33:41 +0000284 /**
285 * {@inheritDoc}
286 */
287 public void updateScopeCurrentPom( Artifact artifact, String scopeIgnored )
288 {
289 log( "updateScopeCurrentPom: artifact=" + artifact + ", scopeIgnored=" + scopeIgnored );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000290
Stuart McCullochacef9482009-09-02 18:33:41 +0000291 DependencyNode node = getNode( artifact );
292
293 if ( node == null )
294 {
295 // updateScopeCurrentPom events can be received prior to includeArtifact events
296 node = addNode( artifact );
297 // TODO remove the node that tried to impose its scope and add some info
298 }
299
300 node.setFailedUpdateScope( scopeIgnored );
301 }
302
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000303
Stuart McCullochacef9482009-09-02 18:33:41 +0000304 /**
305 * {@inheritDoc}
306 */
307 public void selectVersionFromRange( Artifact artifact )
308 {
309 log( "selectVersionFromRange: artifact=" + artifact );
310
311 DependencyNode node = getNode( artifact );
312
313 /*
314 * selectVersionFromRange is called before includeArtifact
315 */
316 if ( node == null && isCurrentNodeIncluded() )
317 {
318 node = addNode( artifact );
319 }
320
321 node.setVersionSelectedFromRange( artifact.getVersionRange() );
322 node.setAvailableVersions( artifact.getAvailableVersions() );
323 }
324
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000325
Stuart McCullochacef9482009-09-02 18:33:41 +0000326 /**
327 * {@inheritDoc}
328 */
329 public void restrictRange( Artifact artifact, Artifact replacement, VersionRange versionRange )
330 {
331 log( "restrictRange: artifact=" + artifact + ", replacement=" + replacement + ", versionRange=" + versionRange );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000332
Stuart McCullochacef9482009-09-02 18:33:41 +0000333 // TODO: track range restriction in node (MNG-3093)
334 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000335
336
Stuart McCullochacef9482009-09-02 18:33:41 +0000337 // ResolutionListenerForDepMgmt methods -----------------------------------
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000338
Stuart McCullochacef9482009-09-02 18:33:41 +0000339 /**
340 * {@inheritDoc}
341 */
342 public void manageArtifactVersion( Artifact artifact, Artifact replacement )
343 {
344 log( "manageArtifactVersion: artifact=" + artifact + ", replacement=" + replacement );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000345
Stuart McCullochacef9482009-09-02 18:33:41 +0000346 /*
347 * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change.
348 * We ignore the second call when the versions are equal.
349 */
350 if ( isCurrentNodeIncluded() && !replacement.getVersion().equals( artifact.getVersion() ) )
351 {
352 /*
353 * Cache management information and apply in includeArtifact, since DefaultArtifactCollector mutates the
354 * artifact and then calls includeArtifact after manageArtifact.
355 */
Stuart McCullochf3f38b22009-09-02 18:57:05 +0000356 managedVersions.put( getRangeId( replacement ), artifact.getVersion() );
Stuart McCullochacef9482009-09-02 18:33:41 +0000357 }
358 }
359
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000360
Stuart McCullochacef9482009-09-02 18:33:41 +0000361 /**
362 * {@inheritDoc}
363 */
364 public void manageArtifactScope( Artifact artifact, Artifact replacement )
365 {
366 log( "manageArtifactScope: artifact=" + artifact + ", replacement=" + replacement );
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000367
Stuart McCullochacef9482009-09-02 18:33:41 +0000368 /*
369 * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change.
370 * We ignore the second call when the scopes are equal.
371 */
372 if ( isCurrentNodeIncluded() && !replacement.getScope().equals( artifact.getScope() ) )
373 {
374 /*
375 * Cache management information and apply in includeArtifact, since DefaultArtifactCollector mutates the
376 * artifact and then calls includeArtifact after manageArtifact.
377 */
Stuart McCullochf3f38b22009-09-02 18:57:05 +0000378 managedScopes.put( getRangeId( replacement ), artifact.getScope() );
Stuart McCullochacef9482009-09-02 18:33:41 +0000379 }
380 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000381
382
Stuart McCullochacef9482009-09-02 18:33:41 +0000383 // public methods ---------------------------------------------------------
384
385 /**
386 * Gets a list of all dependency nodes in the computed dependency tree.
387 *
388 * @return a list of dependency nodes
389 * @deprecated As of 1.1, use a {@link CollectingDependencyNodeVisitor} on the root dependency node
390 */
391 public Collection getNodes()
392 {
393 return Collections.unmodifiableCollection( nodesByArtifact.values() );
394 }
395
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000396
Stuart McCullochacef9482009-09-02 18:33:41 +0000397 /**
398 * Gets the root dependency node of the computed dependency tree.
399 *
400 * @return the root node
401 */
402 public DependencyNode getRootNode()
403 {
404 return rootNode;
405 }
406
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000407
Stuart McCullochacef9482009-09-02 18:33:41 +0000408 // private methods --------------------------------------------------------
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000409
Stuart McCullochacef9482009-09-02 18:33:41 +0000410 /**
411 * Writes the specified message to the log at debug level with indentation for the current node's depth.
412 *
413 * @param message
414 * the message to write to the log
415 */
416 private void log( String message )
417 {
418 int depth = parentNodes.size();
419
420 StringBuffer buffer = new StringBuffer();
421
422 for ( int i = 0; i < depth; i++ )
423 {
424 buffer.append( " " );
425 }
426
427 buffer.append( message );
428
429 logger.debug( buffer.toString() );
430 }
431
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000432
Stuart McCullochacef9482009-09-02 18:33:41 +0000433 /**
434 * Creates a new dependency node for the specified artifact and appends it to the current parent dependency node.
435 *
436 * @param artifact
437 * the attached artifact for the new dependency node
438 * @return the new dependency node
439 */
440 private DependencyNode createNode( Artifact artifact )
441 {
442 DependencyNode node = new DependencyNode( artifact );
443
444 if ( !parentNodes.isEmpty() )
445 {
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000446 DependencyNode parent = ( DependencyNode ) parentNodes.peek();
Stuart McCullochacef9482009-09-02 18:33:41 +0000447
448 parent.addChild( node );
449 }
450
451 return node;
452 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000453
454
Stuart McCullochacef9482009-09-02 18:33:41 +0000455 /**
456 * Creates a new dependency node for the specified artifact, appends it to the current parent dependency node and
457 * puts it into the dependency node cache.
458 *
459 * @param artifact
460 * the attached artifact for the new dependency node
461 * @return the new dependency node
462 */
463 // package protected for unit test
464 DependencyNode addNode( Artifact artifact )
465 {
466 DependencyNode node = createNode( artifact );
467
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000468 DependencyNode previousNode = ( DependencyNode ) nodesByArtifact.put( node.getArtifact(), node );
469
Stuart McCullochacef9482009-09-02 18:33:41 +0000470 if ( previousNode != null )
471 {
472 throw new IllegalStateException( "Duplicate node registered for artifact: " + node.getArtifact() );
473 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000474
Stuart McCullochacef9482009-09-02 18:33:41 +0000475 if ( rootNode == null )
476 {
477 rootNode = node;
478 }
479
480 currentNode = node;
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000481
Stuart McCullochacef9482009-09-02 18:33:41 +0000482 return node;
483 }
484
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000485
Stuart McCullochacef9482009-09-02 18:33:41 +0000486 /**
487 * Gets the dependency node for the specified artifact from the dependency node cache.
488 *
489 * @param artifact
490 * the artifact to find the dependency node for
491 * @return the dependency node, or <code>null</code> if the specified artifact has no corresponding dependency
492 * node
493 */
494 private DependencyNode getNode( Artifact artifact )
495 {
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000496 return ( DependencyNode ) nodesByArtifact.get( artifact );
Stuart McCullochacef9482009-09-02 18:33:41 +0000497 }
498
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000499
Stuart McCullochacef9482009-09-02 18:33:41 +0000500 /**
501 * Removes the dependency node for the specified artifact from the dependency node cache.
502 *
503 * @param artifact
504 * the artifact to remove the dependency node for
505 */
506 private void removeNode( Artifact artifact )
507 {
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000508 DependencyNode node = ( DependencyNode ) nodesByArtifact.remove( artifact );
Stuart McCullochacef9482009-09-02 18:33:41 +0000509
510 if ( !artifact.equals( node.getArtifact() ) )
511 {
512 throw new IllegalStateException( "Removed dependency node artifact was expected to be " + artifact
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000513 + " but was " + node.getArtifact() );
Stuart McCullochacef9482009-09-02 18:33:41 +0000514 }
515 }
516
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000517
Stuart McCullochacef9482009-09-02 18:33:41 +0000518 /**
519 * Gets whether the all the ancestors of the dependency node currently being processed by this listener have an
520 * included state.
521 *
522 * @return <code>true</code> if all the ancestors of the current dependency node have a state of
523 * <code>INCLUDED</code>
524 */
525 private boolean isCurrentNodeIncluded()
526 {
527 boolean included = true;
528
529 for ( Iterator iterator = parentNodes.iterator(); included && iterator.hasNext(); )
530 {
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000531 DependencyNode node = ( DependencyNode ) iterator.next();
Stuart McCullochacef9482009-09-02 18:33:41 +0000532
533 if ( node.getState() != DependencyNode.INCLUDED )
534 {
535 included = false;
536 }
537 }
538
539 return included;
540 }
541
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000542
Stuart McCullochacef9482009-09-02 18:33:41 +0000543 /**
544 * Updates the specified node with any dependency management information cached in prior <code>manageArtifact</code>
545 * calls.
546 *
547 * @param node
548 * the node to update
549 */
550 private void flushDependencyManagement( DependencyNode node )
551 {
552 Artifact artifact = node.getArtifact();
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000553 String premanagedVersion = ( String ) managedVersions.get( getRangeId( artifact ) );
554 String premanagedScope = ( String ) managedScopes.get( getRangeId( artifact ) );
555
Stuart McCullochacef9482009-09-02 18:33:41 +0000556 if ( premanagedVersion != null || premanagedScope != null )
557 {
558 if ( premanagedVersion != null )
559 {
560 node.setPremanagedVersion( premanagedVersion );
561 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000562
Stuart McCullochacef9482009-09-02 18:33:41 +0000563 if ( premanagedScope != null )
564 {
565 node.setPremanagedScope( premanagedScope );
566 }
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000567
Stuart McCullochacef9482009-09-02 18:33:41 +0000568 premanagedVersion = null;
569 premanagedScope = null;
570 }
571 }
Stuart McCullochf3f38b22009-09-02 18:57:05 +0000572
Stuart McCullochd98b02e2011-06-28 23:20:37 +0000573
Stuart McCullochf3f38b22009-09-02 18:57:05 +0000574 private static String getRangeId( Artifact artifact )
575 {
576 return artifact.getDependencyConflictId() + ":" + artifact.getVersionRange();
577 }
Stuart McCulloch150ffa72012-02-11 14:47:23 +0000578
579
580 public void manageArtifactSystemPath( Artifact artifact, Artifact replacement )
581 {
582 // NO-OP
583 }
Stuart McCullochacef9482009-09-02 18:33:41 +0000584}