maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r847301 [18/45] - in /websites/production/maven/content/ref/3.1-SNAPSHOT: ./ apache-maven/ apidocs/ apidocs/org/apache/maven/artifact/ apidocs/org/apache/maven/repository/internal/ apidocs/src-html/org/apache/maven/artifact/ apidocs/src-htm...
Date Sat, 19 Jan 2013 18:00:20 GMT
Modified: websites/production/maven/content/ref/3.1-SNAPSHOT/maven-aether-provider/xref/org/apache/maven/repository/internal/DefaultVersionResolver.html
==============================================================================
--- websites/production/maven/content/ref/3.1-SNAPSHOT/maven-aether-provider/xref/org/apache/maven/repository/internal/DefaultVersionResolver.html (original)
+++ websites/production/maven/content/ref/3.1-SNAPSHOT/maven-aether-provider/xref/org/apache/maven/repository/internal/DefaultVersionResolver.html Sat Jan 19 17:59:58 2013
@@ -30,70 +30,70 @@
 <a class="jxr_linenumber" name="20" href="#20">20</a>  <em class="jxr_comment"> */</em>
 <a class="jxr_linenumber" name="21" href="#21">21</a>  
 <a class="jxr_linenumber" name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> java.io.File;
-<a class="jxr_linenumber" name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> java.io.FileInputStream;
-<a class="jxr_linenumber" name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> java.io.IOException;
-<a class="jxr_linenumber" name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> java.util.ArrayList;
-<a class="jxr_linenumber" name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> java.util.Collections;
-<a class="jxr_linenumber" name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> java.util.HashMap;
-<a class="jxr_linenumber" name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> java.util.List;
-<a class="jxr_linenumber" name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
-<a class="jxr_linenumber" name="30" href="#30">30</a>  
-<a class="jxr_linenumber" name="31" href="#31">31</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.Snapshot;
-<a class="jxr_linenumber" name="32" href="#32">32</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.SnapshotVersion;
-<a class="jxr_linenumber" name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.Versioning;
-<a class="jxr_linenumber" name="34" href="#34">34</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
-<a class="jxr_linenumber" name="35" href="#35">35</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.component.annotations.Component;
-<a class="jxr_linenumber" name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.component.annotations.Requirement;
-<a class="jxr_linenumber" name="37" href="#37">37</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.util.IOUtil;
-<a class="jxr_linenumber" name="38" href="#38">38</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.util.StringUtils;
-<a class="jxr_linenumber" name="39" href="#39">39</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositoryCache;
-<a class="jxr_linenumber" name="40" href="#40">40</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositoryEvent.EventType;
-<a class="jxr_linenumber" name="41" href="#41">41</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositorySystemSession;
-<a class="jxr_linenumber" name="42" href="#42">42</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RequestTrace;
-<a class="jxr_linenumber" name="43" href="#43">43</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.SyncContext;
-<a class="jxr_linenumber" name="44" href="#44">44</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.artifact.Artifact;
-<a class="jxr_linenumber" name="45" href="#45">45</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.MetadataResolver;
-<a class="jxr_linenumber" name="46" href="#46">46</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.RepositoryEventDispatcher;
-<a class="jxr_linenumber" name="47" href="#47">47</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.SyncContextFactory;
-<a class="jxr_linenumber" name="48" href="#48">48</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.VersionResolver;
-<a class="jxr_linenumber" name="49" href="#49">49</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.internal.CacheUtils;
-<a class="jxr_linenumber" name="50" href="#50">50</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.metadata.Metadata;
-<a class="jxr_linenumber" name="51" href="#51">51</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.ArtifactRepository;
-<a class="jxr_linenumber" name="52" href="#52">52</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.LocalRepository;
-<a class="jxr_linenumber" name="53" href="#53">53</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.RemoteRepository;
-<a class="jxr_linenumber" name="54" href="#54">54</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.WorkspaceReader;
-<a class="jxr_linenumber" name="55" href="#55">55</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.WorkspaceRepository;
-<a class="jxr_linenumber" name="56" href="#56">56</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.MetadataRequest;
-<a class="jxr_linenumber" name="57" href="#57">57</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.MetadataResult;
-<a class="jxr_linenumber" name="58" href="#58">58</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionRequest;
-<a class="jxr_linenumber" name="59" href="#59">59</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionResolutionException;
-<a class="jxr_linenumber" name="60" href="#60">60</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionResult;
-<a class="jxr_linenumber" name="61" href="#61">61</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.locator.Service;
-<a class="jxr_linenumber" name="62" href="#62">62</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.locator.ServiceLocator;
-<a class="jxr_linenumber" name="63" href="#63">63</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.log.Logger;
-<a class="jxr_linenumber" name="64" href="#64">64</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.log.NullLogger;
-<a class="jxr_linenumber" name="65" href="#65">65</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.ConfigUtils;
-<a class="jxr_linenumber" name="66" href="#66">66</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.DefaultRequestTrace;
-<a class="jxr_linenumber" name="67" href="#67">67</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.listener.DefaultRepositoryEvent;
-<a class="jxr_linenumber" name="68" href="#68">68</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.metadata.DefaultMetadata;
-<a class="jxr_linenumber" name="69" href="#69">69</a>  
-<a class="jxr_linenumber" name="70" href="#70">70</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="71" href="#71">71</a>  <em class="jxr_javadoccomment"> * @author Benjamin Bentmann</em>
-<a class="jxr_linenumber" name="72" href="#72">72</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="73" href="#73">73</a>  @Component( role = VersionResolver.<strong class="jxr_keyword">class</strong> )
-<a class="jxr_linenumber" name="74" href="#74">74</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">DefaultVersionResolver</a>
-<a class="jxr_linenumber" name="75" href="#75">75</a>      <strong class="jxr_keyword">implements</strong> VersionResolver, Service
-<a class="jxr_linenumber" name="76" href="#76">76</a>  {
-<a class="jxr_linenumber" name="77" href="#77">77</a>  
-<a class="jxr_linenumber" name="78" href="#78">78</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String MAVEN_METADATA_XML = <span class="jxr_string">"maven-metadata.xml"</span>;
-<a class="jxr_linenumber" name="79" href="#79">79</a>  
-<a class="jxr_linenumber" name="80" href="#80">80</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String RELEASE = <span class="jxr_string">"RELEASE"</span>;
-<a class="jxr_linenumber" name="81" href="#81">81</a>  
-<a class="jxr_linenumber" name="82" href="#82">82</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String LATEST = <span class="jxr_string">"LATEST"</span>;
-<a class="jxr_linenumber" name="83" href="#83">83</a>  
-<a class="jxr_linenumber" name="84" href="#84">84</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String SNAPSHOT = <span class="jxr_string">"SNAPSHOT"</span>;
-<a class="jxr_linenumber" name="85" href="#85">85</a>  
-<a class="jxr_linenumber" name="86" href="#86">86</a>      @SuppressWarnings( <span class="jxr_string">"unused"</span> )
+<a class="jxr_linenumber" name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> java.io.IOException;
+<a class="jxr_linenumber" name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> java.util.ArrayList;
+<a class="jxr_linenumber" name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> java.util.Collections;
+<a class="jxr_linenumber" name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a class="jxr_linenumber" name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a class="jxr_linenumber" name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
+<a class="jxr_linenumber" name="29" href="#29">29</a>  
+<a class="jxr_linenumber" name="30" href="#30">30</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.Snapshot;
+<a class="jxr_linenumber" name="31" href="#31">31</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.SnapshotVersion;
+<a class="jxr_linenumber" name="32" href="#32">32</a>  <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.repository.metadata.Versioning;
+<a class="jxr_linenumber" name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.component.annotations.Component;
+<a class="jxr_linenumber" name="34" href="#34">34</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.component.annotations.Requirement;
+<a class="jxr_linenumber" name="35" href="#35">35</a>  <strong class="jxr_keyword">import</strong> org.codehaus.plexus.util.StringUtils;
+<a class="jxr_linenumber" name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositoryCache;
+<a class="jxr_linenumber" name="37" href="#37">37</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositoryEvent.EventType;
+<a class="jxr_linenumber" name="38" href="#38">38</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RepositorySystemSession;
+<a class="jxr_linenumber" name="39" href="#39">39</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.RequestTrace;
+<a class="jxr_linenumber" name="40" href="#40">40</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.SyncContext;
+<a class="jxr_linenumber" name="41" href="#41">41</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.artifact.Artifact;
+<a class="jxr_linenumber" name="42" href="#42">42</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.MetadataResolver;
+<a class="jxr_linenumber" name="43" href="#43">43</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.RepositoryEventDispatcher;
+<a class="jxr_linenumber" name="44" href="#44">44</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.SyncContextFactory;
+<a class="jxr_linenumber" name="45" href="#45">45</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.VersionResolver;
+<a class="jxr_linenumber" name="46" href="#46">46</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.impl.internal.CacheUtils;
+<a class="jxr_linenumber" name="47" href="#47">47</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.metadata.Metadata;
+<a class="jxr_linenumber" name="48" href="#48">48</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.ArtifactRepository;
+<a class="jxr_linenumber" name="49" href="#49">49</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.LocalRepository;
+<a class="jxr_linenumber" name="50" href="#50">50</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.RemoteRepository;
+<a class="jxr_linenumber" name="51" href="#51">51</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.WorkspaceReader;
+<a class="jxr_linenumber" name="52" href="#52">52</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.repository.WorkspaceRepository;
+<a class="jxr_linenumber" name="53" href="#53">53</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.MetadataRequest;
+<a class="jxr_linenumber" name="54" href="#54">54</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.MetadataResult;
+<a class="jxr_linenumber" name="55" href="#55">55</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionRequest;
+<a class="jxr_linenumber" name="56" href="#56">56</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionResolutionException;
+<a class="jxr_linenumber" name="57" href="#57">57</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.resolution.VersionResult;
+<a class="jxr_linenumber" name="58" href="#58">58</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.locator.Service;
+<a class="jxr_linenumber" name="59" href="#59">59</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.locator.ServiceLocator;
+<a class="jxr_linenumber" name="60" href="#60">60</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.log.Logger;
+<a class="jxr_linenumber" name="61" href="#61">61</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.spi.log.NullLogger;
+<a class="jxr_linenumber" name="62" href="#62">62</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.ConfigUtils;
+<a class="jxr_linenumber" name="63" href="#63">63</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.DefaultRequestTrace;
+<a class="jxr_linenumber" name="64" href="#64">64</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.listener.DefaultRepositoryEvent;
+<a class="jxr_linenumber" name="65" href="#65">65</a>  <strong class="jxr_keyword">import</strong> org.sonatype.aether.util.metadata.DefaultMetadata;
+<a class="jxr_linenumber" name="66" href="#66">66</a>  
+<a class="jxr_linenumber" name="67" href="#67">67</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="68" href="#68">68</a>  <em class="jxr_javadoccomment"> * Maven meta-version resolver: supports &lt;code&gt;*-SNAPSHOT&lt;/code&gt;, &lt;code&gt;RELEASE&lt;/code&gt; and &lt;code&gt;LATEST&lt;/code&gt;</em>
+<a class="jxr_linenumber" name="69" href="#69">69</a>  <em class="jxr_javadoccomment"> * meta-version resolution from</em>
+<a class="jxr_linenumber" name="70" href="#70">70</a>  <em class="jxr_javadoccomment"> * &lt;a href="../maven-repository-metadata/repository-metadata.html#class_versioning"&gt;&lt;code&gt;versioning&lt;/code&gt;</em>
+<a class="jxr_linenumber" name="71" href="#71">71</a>  <em class="jxr_javadoccomment"> * element in repositories' &lt;code&gt;maven-metadata.xml&lt;/code&gt;&lt;/a&gt;.</em>
+<a class="jxr_linenumber" name="72" href="#72">72</a>  <em class="jxr_javadoccomment"> * </em>
+<a class="jxr_linenumber" name="73" href="#73">73</a>  <em class="jxr_javadoccomment"> * @author Benjamin Bentmann</em>
+<a class="jxr_linenumber" name="74" href="#74">74</a>  <em class="jxr_javadoccomment"> * @see Versioning</em>
+<a class="jxr_linenumber" name="75" href="#75">75</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="76" href="#76">76</a>  @Component( role = VersionResolver.<strong class="jxr_keyword">class</strong> )
+<a class="jxr_linenumber" name="77" href="#77">77</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">DefaultVersionResolver</a>
+<a class="jxr_linenumber" name="78" href="#78">78</a>      <strong class="jxr_keyword">implements</strong> VersionResolver, Service
+<a class="jxr_linenumber" name="79" href="#79">79</a>  {
+<a class="jxr_linenumber" name="80" href="#80">80</a>  
+<a class="jxr_linenumber" name="81" href="#81">81</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String RELEASE = <span class="jxr_string">"RELEASE"</span>;
+<a class="jxr_linenumber" name="82" href="#82">82</a>  
+<a class="jxr_linenumber" name="83" href="#83">83</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String LATEST = <span class="jxr_string">"LATEST"</span>;
+<a class="jxr_linenumber" name="84" href="#84">84</a>  
+<a class="jxr_linenumber" name="85" href="#85">85</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String SNAPSHOT = <span class="jxr_string">"SNAPSHOT"</span>;
+<a class="jxr_linenumber" name="86" href="#86">86</a>  
 <a class="jxr_linenumber" name="87" href="#87">87</a>      @Requirement
 <a class="jxr_linenumber" name="88" href="#88">88</a>      <strong class="jxr_keyword">private</strong> Logger logger = NullLogger.INSTANCE;
 <a class="jxr_linenumber" name="89" href="#89">89</a>  
@@ -153,158 +153,158 @@
 <a class="jxr_linenumber" name="143" href="#143">143</a>     <strong class="jxr_keyword">public</strong> VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
 <a class="jxr_linenumber" name="144" href="#144">144</a>         <strong class="jxr_keyword">throws</strong> VersionResolutionException
 <a class="jxr_linenumber" name="145" href="#145">145</a>     {
-<a class="jxr_linenumber" name="146" href="#146">146</a>         RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );
+<a class="jxr_linenumber" name="146" href="#146">146</a>         Artifact artifact = request.getArtifact();
 <a class="jxr_linenumber" name="147" href="#147">147</a> 
-<a class="jxr_linenumber" name="148" href="#148">148</a>         Artifact artifact = request.getArtifact();
+<a class="jxr_linenumber" name="148" href="#148">148</a>         String version = artifact.getVersion();
 <a class="jxr_linenumber" name="149" href="#149">149</a> 
-<a class="jxr_linenumber" name="150" href="#150">150</a>         String version = artifact.getVersion();
+<a class="jxr_linenumber" name="150" href="#150">150</a>         VersionResult result = <strong class="jxr_keyword">new</strong> VersionResult( request );
 <a class="jxr_linenumber" name="151" href="#151">151</a> 
-<a class="jxr_linenumber" name="152" href="#152">152</a>         VersionResult result = <strong class="jxr_keyword">new</strong> VersionResult( request );
-<a class="jxr_linenumber" name="153" href="#153">153</a> 
-<a class="jxr_linenumber" name="154" href="#154">154</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Key</a> cacheKey = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="155" href="#155">155</a>         RepositoryCache cache = session.getCache();
-<a class="jxr_linenumber" name="156" href="#156">156</a> 
-<a class="jxr_linenumber" name="157" href="#157">157</a>         <strong class="jxr_keyword">if</strong> ( cache != <strong class="jxr_keyword">null</strong> &amp;&amp; !ConfigUtils.getBoolean( session, false, <span class="jxr_string">"aether.versionResolver.noCache"</span> ) )
-<a class="jxr_linenumber" name="158" href="#158">158</a>         {
-<a class="jxr_linenumber" name="159" href="#159">159</a>             cacheKey = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Key</a>( session, request );
-<a class="jxr_linenumber" name="160" href="#160">160</a> 
-<a class="jxr_linenumber" name="161" href="#161">161</a>             Object obj = cache.get( session, cacheKey );
-<a class="jxr_linenumber" name="162" href="#162">162</a>             <strong class="jxr_keyword">if</strong> ( obj instanceof Record )
-<a class="jxr_linenumber" name="163" href="#163">163</a>             {
-<a class="jxr_linenumber" name="164" href="#164">164</a>                 <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Record</a> record = (Record) obj;
-<a class="jxr_linenumber" name="165" href="#165">165</a>                 result.setVersion( record.version );
-<a class="jxr_linenumber" name="166" href="#166">166</a>                 result.setRepository( CacheUtils.getRepository( session, request.getRepositories(), record.repoClass,
-<a class="jxr_linenumber" name="167" href="#167">167</a>                                                                 record.repoId ) );
-<a class="jxr_linenumber" name="168" href="#168">168</a>                 <strong class="jxr_keyword">return</strong> result;
-<a class="jxr_linenumber" name="169" href="#169">169</a>             }
-<a class="jxr_linenumber" name="170" href="#170">170</a>         }
-<a class="jxr_linenumber" name="171" href="#171">171</a> 
-<a class="jxr_linenumber" name="172" href="#172">172</a>         Metadata metadata;
+<a class="jxr_linenumber" name="152" href="#152">152</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Key</a> cacheKey = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="153" href="#153">153</a>         RepositoryCache cache = session.getCache();
+<a class="jxr_linenumber" name="154" href="#154">154</a> 
+<a class="jxr_linenumber" name="155" href="#155">155</a>         <strong class="jxr_keyword">if</strong> ( cache != <strong class="jxr_keyword">null</strong> &amp;&amp; !ConfigUtils.getBoolean( session, false, <span class="jxr_string">"aether.versionResolver.noCache"</span> ) )
+<a class="jxr_linenumber" name="156" href="#156">156</a>         {
+<a class="jxr_linenumber" name="157" href="#157">157</a>             cacheKey = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Key</a>( session, request );
+<a class="jxr_linenumber" name="158" href="#158">158</a> 
+<a class="jxr_linenumber" name="159" href="#159">159</a>             Object obj = cache.get( session, cacheKey );
+<a class="jxr_linenumber" name="160" href="#160">160</a>             <strong class="jxr_keyword">if</strong> ( obj instanceof Record )
+<a class="jxr_linenumber" name="161" href="#161">161</a>             {
+<a class="jxr_linenumber" name="162" href="#162">162</a>                 <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">Record</a> record = (Record) obj;
+<a class="jxr_linenumber" name="163" href="#163">163</a>                 result.setVersion( record.version );
+<a class="jxr_linenumber" name="164" href="#164">164</a>                 result.setRepository( CacheUtils.getRepository( session, request.getRepositories(), record.repoClass,
+<a class="jxr_linenumber" name="165" href="#165">165</a>                                                                 record.repoId ) );
+<a class="jxr_linenumber" name="166" href="#166">166</a>                 <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="167" href="#167">167</a>             }
+<a class="jxr_linenumber" name="168" href="#168">168</a>         }
+<a class="jxr_linenumber" name="169" href="#169">169</a> 
+<a class="jxr_linenumber" name="170" href="#170">170</a>         <strong class="jxr_keyword">if</strong> ( RELEASE.equals( version ) )
+<a class="jxr_linenumber" name="171" href="#171">171</a>         {
+<a class="jxr_linenumber" name="172" href="#172">172</a>             Map&lt;String, VersionInfo&gt; infos = readVersionInfoMap( session, result, Metadata.Nature.RELEASE, <strong class="jxr_keyword">null</strong> );
 <a class="jxr_linenumber" name="173" href="#173">173</a> 
-<a class="jxr_linenumber" name="174" href="#174">174</a>         <strong class="jxr_keyword">if</strong> ( RELEASE.equals( version ) )
-<a class="jxr_linenumber" name="175" href="#175">175</a>         {
-<a class="jxr_linenumber" name="176" href="#176">176</a>             metadata =
-<a class="jxr_linenumber" name="177" href="#177">177</a>                 <strong class="jxr_keyword">new</strong> DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), MAVEN_METADATA_XML,
-<a class="jxr_linenumber" name="178" href="#178">178</a>                                      Metadata.Nature.RELEASE );
-<a class="jxr_linenumber" name="179" href="#179">179</a>         }
-<a class="jxr_linenumber" name="180" href="#180">180</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( LATEST.equals( version ) )
-<a class="jxr_linenumber" name="181" href="#181">181</a>         {
-<a class="jxr_linenumber" name="182" href="#182">182</a>             metadata =
-<a class="jxr_linenumber" name="183" href="#183">183</a>                 <strong class="jxr_keyword">new</strong> DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), MAVEN_METADATA_XML,
-<a class="jxr_linenumber" name="184" href="#184">184</a>                                      Metadata.Nature.RELEASE_OR_SNAPSHOT );
-<a class="jxr_linenumber" name="185" href="#185">185</a>         }
-<a class="jxr_linenumber" name="186" href="#186">186</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( version.endsWith( SNAPSHOT ) )
-<a class="jxr_linenumber" name="187" href="#187">187</a>         {
-<a class="jxr_linenumber" name="188" href="#188">188</a>             WorkspaceReader workspace = session.getWorkspaceReader();
-<a class="jxr_linenumber" name="189" href="#189">189</a>             <strong class="jxr_keyword">if</strong> ( workspace != <strong class="jxr_keyword">null</strong> &amp;&amp; workspace.findVersions( artifact ).contains( version ) )
-<a class="jxr_linenumber" name="190" href="#190">190</a>             {
-<a class="jxr_linenumber" name="191" href="#191">191</a>                 metadata = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="192" href="#192">192</a>                 result.setRepository( workspace.getRepository() );
-<a class="jxr_linenumber" name="193" href="#193">193</a>             }
-<a class="jxr_linenumber" name="194" href="#194">194</a>             <strong class="jxr_keyword">else</strong>
-<a class="jxr_linenumber" name="195" href="#195">195</a>             {
-<a class="jxr_linenumber" name="196" href="#196">196</a>                 metadata =
-<a class="jxr_linenumber" name="197" href="#197">197</a>                     <strong class="jxr_keyword">new</strong> DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), version, MAVEN_METADATA_XML,
-<a class="jxr_linenumber" name="198" href="#198">198</a>                                          Metadata.Nature.SNAPSHOT );
-<a class="jxr_linenumber" name="199" href="#199">199</a>             }
-<a class="jxr_linenumber" name="200" href="#200">200</a>         }
-<a class="jxr_linenumber" name="201" href="#201">201</a>         <strong class="jxr_keyword">else</strong>
-<a class="jxr_linenumber" name="202" href="#202">202</a>         {
-<a class="jxr_linenumber" name="203" href="#203">203</a>             metadata = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="204" href="#204">204</a>         }
-<a class="jxr_linenumber" name="205" href="#205">205</a> 
-<a class="jxr_linenumber" name="206" href="#206">206</a>         <strong class="jxr_keyword">if</strong> ( metadata == <strong class="jxr_keyword">null</strong> )
-<a class="jxr_linenumber" name="207" href="#207">207</a>         {
-<a class="jxr_linenumber" name="208" href="#208">208</a>             result.setVersion( version );
-<a class="jxr_linenumber" name="209" href="#209">209</a>         }
-<a class="jxr_linenumber" name="210" href="#210">210</a>         <strong class="jxr_keyword">else</strong>
-<a class="jxr_linenumber" name="211" href="#211">211</a>         {
-<a class="jxr_linenumber" name="212" href="#212">212</a>             List&lt;MetadataRequest&gt; metadataRequests = <strong class="jxr_keyword">new</strong> ArrayList&lt;MetadataRequest&gt;( request.getRepositories().size() );
-<a class="jxr_linenumber" name="213" href="#213">213</a> 
-<a class="jxr_linenumber" name="214" href="#214">214</a>             metadataRequests.add( <strong class="jxr_keyword">new</strong> MetadataRequest( metadata, <strong class="jxr_keyword">null</strong>, request.getRequestContext() ) );
-<a class="jxr_linenumber" name="215" href="#215">215</a> 
-<a class="jxr_linenumber" name="216" href="#216">216</a>             <strong class="jxr_keyword">for</strong> ( RemoteRepository repository : request.getRepositories() )
-<a class="jxr_linenumber" name="217" href="#217">217</a>             {
-<a class="jxr_linenumber" name="218" href="#218">218</a>                 MetadataRequest metadataRequest =
-<a class="jxr_linenumber" name="219" href="#219">219</a>                     <strong class="jxr_keyword">new</strong> MetadataRequest( metadata, repository, request.getRequestContext() );
-<a class="jxr_linenumber" name="220" href="#220">220</a>                 metadataRequest.setDeleteLocalCopyIfMissing( <strong class="jxr_keyword">true</strong> );
-<a class="jxr_linenumber" name="221" href="#221">221</a>                 metadataRequest.setFavorLocalRepository( <strong class="jxr_keyword">true</strong> );
-<a class="jxr_linenumber" name="222" href="#222">222</a>                 metadataRequest.setTrace( trace );
-<a class="jxr_linenumber" name="223" href="#223">223</a>                 metadataRequests.add( metadataRequest );
-<a class="jxr_linenumber" name="224" href="#224">224</a>             }
+<a class="jxr_linenumber" name="174" href="#174">174</a>             resolve( result, infos, RELEASE );
+<a class="jxr_linenumber" name="175" href="#175">175</a>         }
+<a class="jxr_linenumber" name="176" href="#176">176</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( LATEST.equals( version ) )
+<a class="jxr_linenumber" name="177" href="#177">177</a>         {
+<a class="jxr_linenumber" name="178" href="#178">178</a>             Map&lt;String, VersionInfo&gt; infos =
+<a class="jxr_linenumber" name="179" href="#179">179</a>                 readVersionInfoMap( session, result, Metadata.Nature.RELEASE_OR_SNAPSHOT, <strong class="jxr_keyword">null</strong> );
+<a class="jxr_linenumber" name="180" href="#180">180</a> 
+<a class="jxr_linenumber" name="181" href="#181">181</a>             <strong class="jxr_keyword">if</strong> ( !resolve( result, infos, LATEST ) )
+<a class="jxr_linenumber" name="182" href="#182">182</a>             {
+<a class="jxr_linenumber" name="183" href="#183">183</a>                 resolve( result, infos, RELEASE );
+<a class="jxr_linenumber" name="184" href="#184">184</a>             }
+<a class="jxr_linenumber" name="185" href="#185">185</a> 
+<a class="jxr_linenumber" name="186" href="#186">186</a>             <strong class="jxr_keyword">if</strong> ( result.getVersion() != <strong class="jxr_keyword">null</strong> &amp;&amp; result.getVersion().endsWith( SNAPSHOT ) )
+<a class="jxr_linenumber" name="187" href="#187">187</a>             {
+<a class="jxr_linenumber" name="188" href="#188">188</a>                 VersionRequest subRequest = <strong class="jxr_keyword">new</strong> VersionRequest();
+<a class="jxr_linenumber" name="189" href="#189">189</a>                 subRequest.setArtifact( artifact.setVersion( result.getVersion() ) );
+<a class="jxr_linenumber" name="190" href="#190">190</a>                 <strong class="jxr_keyword">if</strong> ( result.getRepository() instanceof RemoteRepository )
+<a class="jxr_linenumber" name="191" href="#191">191</a>                 {
+<a class="jxr_linenumber" name="192" href="#192">192</a>                     subRequest.setRepositories( Collections.singletonList( (RemoteRepository) result.getRepository() ) );
+<a class="jxr_linenumber" name="193" href="#193">193</a>                 }
+<a class="jxr_linenumber" name="194" href="#194">194</a>                 <strong class="jxr_keyword">else</strong>
+<a class="jxr_linenumber" name="195" href="#195">195</a>                 {
+<a class="jxr_linenumber" name="196" href="#196">196</a>                     subRequest.setRepositories( request.getRepositories() );
+<a class="jxr_linenumber" name="197" href="#197">197</a>                 }
+<a class="jxr_linenumber" name="198" href="#198">198</a>                 VersionResult subResult = resolveVersion( session, subRequest );
+<a class="jxr_linenumber" name="199" href="#199">199</a>                 result.setVersion( subResult.getVersion() );
+<a class="jxr_linenumber" name="200" href="#200">200</a>                 result.setRepository( subResult.getRepository() );
+<a class="jxr_linenumber" name="201" href="#201">201</a>                 <strong class="jxr_keyword">for</strong> ( Exception exception : subResult.getExceptions() )
+<a class="jxr_linenumber" name="202" href="#202">202</a>                 {
+<a class="jxr_linenumber" name="203" href="#203">203</a>                     result.addException( exception );
+<a class="jxr_linenumber" name="204" href="#204">204</a>                 }
+<a class="jxr_linenumber" name="205" href="#205">205</a>             }
+<a class="jxr_linenumber" name="206" href="#206">206</a>         }
+<a class="jxr_linenumber" name="207" href="#207">207</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( version.endsWith( SNAPSHOT ) )
+<a class="jxr_linenumber" name="208" href="#208">208</a>         {
+<a class="jxr_linenumber" name="209" href="#209">209</a>             WorkspaceReader workspace = session.getWorkspaceReader();
+<a class="jxr_linenumber" name="210" href="#210">210</a>             <strong class="jxr_keyword">if</strong> ( workspace != <strong class="jxr_keyword">null</strong> &amp;&amp; workspace.findVersions( artifact ).contains( version ) )
+<a class="jxr_linenumber" name="211" href="#211">211</a>             {
+<a class="jxr_linenumber" name="212" href="#212">212</a>                 result.setVersion( version );
+<a class="jxr_linenumber" name="213" href="#213">213</a>                 result.setRepository( workspace.getRepository() );
+<a class="jxr_linenumber" name="214" href="#214">214</a> 
+<a class="jxr_linenumber" name="215" href="#215">215</a>                 <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="216" href="#216">216</a>             }
+<a class="jxr_linenumber" name="217" href="#217">217</a>             <strong class="jxr_keyword">else</strong>
+<a class="jxr_linenumber" name="218" href="#218">218</a>             {
+<a class="jxr_linenumber" name="219" href="#219">219</a>                 Map&lt;String, VersionInfo&gt; infos =
+<a class="jxr_linenumber" name="220" href="#220">220</a>                                 readVersionInfoMap( session, result, Metadata.Nature.SNAPSHOT, version );
+<a class="jxr_linenumber" name="221" href="#221">221</a> 
+<a class="jxr_linenumber" name="222" href="#222">222</a>                 String key = SNAPSHOT + getKey( artifact.getClassifier(), artifact.getExtension() );
+<a class="jxr_linenumber" name="223" href="#223">223</a> 
+<a class="jxr_linenumber" name="224" href="#224">224</a>                 merge( infos, SNAPSHOT, key );
 <a class="jxr_linenumber" name="225" href="#225">225</a> 
-<a class="jxr_linenumber" name="226" href="#226">226</a>             List&lt;MetadataResult&gt; metadataResults = metadataResolver.resolveMetadata( session, metadataRequests );
-<a class="jxr_linenumber" name="227" href="#227">227</a> 
-<a class="jxr_linenumber" name="228" href="#228">228</a>             Map&lt;String, VersionInfo&gt; infos = <strong class="jxr_keyword">new</strong> HashMap&lt;String, VersionInfo&gt;();
-<a class="jxr_linenumber" name="229" href="#229">229</a> 
-<a class="jxr_linenumber" name="230" href="#230">230</a>             <strong class="jxr_keyword">for</strong> ( MetadataResult metadataResult : metadataResults )
-<a class="jxr_linenumber" name="231" href="#231">231</a>             {
-<a class="jxr_linenumber" name="232" href="#232">232</a>                 result.addException( metadataResult.getException() );
-<a class="jxr_linenumber" name="233" href="#233">233</a> 
-<a class="jxr_linenumber" name="234" href="#234">234</a>                 ArtifactRepository repository = metadataResult.getRequest().getRepository();
-<a class="jxr_linenumber" name="235" href="#235">235</a>                 <strong class="jxr_keyword">if</strong> ( repository == <strong class="jxr_keyword">null</strong> )
-<a class="jxr_linenumber" name="236" href="#236">236</a>                 {
-<a class="jxr_linenumber" name="237" href="#237">237</a>                     repository = session.getLocalRepository();
-<a class="jxr_linenumber" name="238" href="#238">238</a>                 }
-<a class="jxr_linenumber" name="239" href="#239">239</a> 
-<a class="jxr_linenumber" name="240" href="#240">240</a>                 Versioning versioning = readVersions( session, trace, metadataResult.getMetadata(), repository, result );
-<a class="jxr_linenumber" name="241" href="#241">241</a>                 merge( artifact, infos, versioning, repository );
-<a class="jxr_linenumber" name="242" href="#242">242</a>             }
+<a class="jxr_linenumber" name="226" href="#226">226</a>                 <strong class="jxr_keyword">if</strong> ( !resolve( result, infos, key ) )
+<a class="jxr_linenumber" name="227" href="#227">227</a>                 {
+<a class="jxr_linenumber" name="228" href="#228">228</a>                     result.setVersion( version );
+<a class="jxr_linenumber" name="229" href="#229">229</a>                 }
+<a class="jxr_linenumber" name="230" href="#230">230</a>             }
+<a class="jxr_linenumber" name="231" href="#231">231</a>         }
+<a class="jxr_linenumber" name="232" href="#232">232</a>         <strong class="jxr_keyword">else</strong>
+<a class="jxr_linenumber" name="233" href="#233">233</a>         {
+<a class="jxr_linenumber" name="234" href="#234">234</a>             result.setVersion( version );
+<a class="jxr_linenumber" name="235" href="#235">235</a> 
+<a class="jxr_linenumber" name="236" href="#236">236</a>             <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="237" href="#237">237</a>         }
+<a class="jxr_linenumber" name="238" href="#238">238</a> 
+<a class="jxr_linenumber" name="239" href="#239">239</a>         <strong class="jxr_keyword">if</strong> ( StringUtils.isEmpty( result.getVersion() ) )
+<a class="jxr_linenumber" name="240" href="#240">240</a>         {
+<a class="jxr_linenumber" name="241" href="#241">241</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> VersionResolutionException( result );
+<a class="jxr_linenumber" name="242" href="#242">242</a>         }
 <a class="jxr_linenumber" name="243" href="#243">243</a> 
-<a class="jxr_linenumber" name="244" href="#244">244</a>             <strong class="jxr_keyword">if</strong> ( RELEASE.equals( version ) )
-<a class="jxr_linenumber" name="245" href="#245">245</a>             {
-<a class="jxr_linenumber" name="246" href="#246">246</a>                 resolve( result, infos, RELEASE );
-<a class="jxr_linenumber" name="247" href="#247">247</a>             }
-<a class="jxr_linenumber" name="248" href="#248">248</a>             <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( LATEST.equals( version ) )
-<a class="jxr_linenumber" name="249" href="#249">249</a>             {
-<a class="jxr_linenumber" name="250" href="#250">250</a>                 <strong class="jxr_keyword">if</strong> ( !resolve( result, infos, LATEST ) )
-<a class="jxr_linenumber" name="251" href="#251">251</a>                 {
-<a class="jxr_linenumber" name="252" href="#252">252</a>                     resolve( result, infos, RELEASE );
-<a class="jxr_linenumber" name="253" href="#253">253</a>                 }
-<a class="jxr_linenumber" name="254" href="#254">254</a> 
-<a class="jxr_linenumber" name="255" href="#255">255</a>                 <strong class="jxr_keyword">if</strong> ( result.getVersion() != <strong class="jxr_keyword">null</strong> &amp;&amp; result.getVersion().endsWith( SNAPSHOT ) )
-<a class="jxr_linenumber" name="256" href="#256">256</a>                 {
-<a class="jxr_linenumber" name="257" href="#257">257</a>                     VersionRequest subRequest = <strong class="jxr_keyword">new</strong> VersionRequest();
-<a class="jxr_linenumber" name="258" href="#258">258</a>                     subRequest.setArtifact( artifact.setVersion( result.getVersion() ) );
-<a class="jxr_linenumber" name="259" href="#259">259</a>                     <strong class="jxr_keyword">if</strong> ( result.getRepository() instanceof RemoteRepository )
-<a class="jxr_linenumber" name="260" href="#260">260</a>                     {
-<a class="jxr_linenumber" name="261" href="#261">261</a>                         subRequest.setRepositories( Collections.singletonList( (RemoteRepository) result.getRepository() ) );
-<a class="jxr_linenumber" name="262" href="#262">262</a>                     }
-<a class="jxr_linenumber" name="263" href="#263">263</a>                     <strong class="jxr_keyword">else</strong>
-<a class="jxr_linenumber" name="264" href="#264">264</a>                     {
-<a class="jxr_linenumber" name="265" href="#265">265</a>                         subRequest.setRepositories( request.getRepositories() );
-<a class="jxr_linenumber" name="266" href="#266">266</a>                     }
-<a class="jxr_linenumber" name="267" href="#267">267</a>                     VersionResult subResult = resolveVersion( session, subRequest );
-<a class="jxr_linenumber" name="268" href="#268">268</a>                     result.setVersion( subResult.getVersion() );
-<a class="jxr_linenumber" name="269" href="#269">269</a>                     result.setRepository( subResult.getRepository() );
-<a class="jxr_linenumber" name="270" href="#270">270</a>                     <strong class="jxr_keyword">for</strong> ( Exception exception : subResult.getExceptions() )
-<a class="jxr_linenumber" name="271" href="#271">271</a>                     {
-<a class="jxr_linenumber" name="272" href="#272">272</a>                         result.addException( exception );
-<a class="jxr_linenumber" name="273" href="#273">273</a>                     }
-<a class="jxr_linenumber" name="274" href="#274">274</a>                 }
-<a class="jxr_linenumber" name="275" href="#275">275</a>             }
-<a class="jxr_linenumber" name="276" href="#276">276</a>             <strong class="jxr_keyword">else</strong>
-<a class="jxr_linenumber" name="277" href="#277">277</a>             {
-<a class="jxr_linenumber" name="278" href="#278">278</a>                 String key = SNAPSHOT + getKey( artifact.getClassifier(), artifact.getExtension() );
-<a class="jxr_linenumber" name="279" href="#279">279</a>                 merge( infos, SNAPSHOT, key );
-<a class="jxr_linenumber" name="280" href="#280">280</a>                 <strong class="jxr_keyword">if</strong> ( !resolve( result, infos, key ) )
-<a class="jxr_linenumber" name="281" href="#281">281</a>                 {
-<a class="jxr_linenumber" name="282" href="#282">282</a>                     result.setVersion( version );
-<a class="jxr_linenumber" name="283" href="#283">283</a>                 }
-<a class="jxr_linenumber" name="284" href="#284">284</a>             }
+<a class="jxr_linenumber" name="244" href="#244">244</a>         <strong class="jxr_keyword">if</strong> ( cacheKey != <strong class="jxr_keyword">null</strong> &amp;&amp; isSafelyCacheable( session, artifact ) )
+<a class="jxr_linenumber" name="245" href="#245">245</a>         {
+<a class="jxr_linenumber" name="246" href="#246">246</a>             cache.put( session, cacheKey, <strong class="jxr_keyword">new</strong> Record( result.getVersion(), result.getRepository() ) );
+<a class="jxr_linenumber" name="247" href="#247">247</a>         }
+<a class="jxr_linenumber" name="248" href="#248">248</a> 
+<a class="jxr_linenumber" name="249" href="#249">249</a>         <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="250" href="#250">250</a>     }
+<a class="jxr_linenumber" name="251" href="#251">251</a> 
+<a class="jxr_linenumber" name="252" href="#252">252</a>     <strong class="jxr_keyword">private</strong> Map&lt;String, VersionInfo&gt; readVersionInfoMap( RepositorySystemSession session, VersionResult result,
+<a class="jxr_linenumber" name="253" href="#253">253</a>                                                          Metadata.Nature nature, String version )
+<a class="jxr_linenumber" name="254" href="#254">254</a>     {
+<a class="jxr_linenumber" name="255" href="#255">255</a>         VersionRequest request = result.getRequest();
+<a class="jxr_linenumber" name="256" href="#256">256</a>         Artifact artifact = request.getArtifact();
+<a class="jxr_linenumber" name="257" href="#257">257</a> 
+<a class="jxr_linenumber" name="258" href="#258">258</a>         Metadata metadata =
+<a class="jxr_linenumber" name="259" href="#259">259</a>             <strong class="jxr_keyword">new</strong> DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), version,
+<a class="jxr_linenumber" name="260" href="#260">260</a>                                  MavenMetadata.MAVEN_METADATA_XML, nature );
+<a class="jxr_linenumber" name="261" href="#261">261</a> 
+<a class="jxr_linenumber" name="262" href="#262">262</a>         RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );
+<a class="jxr_linenumber" name="263" href="#263">263</a> 
+<a class="jxr_linenumber" name="264" href="#264">264</a>         List&lt;MetadataRequest&gt; metadataRequests = <strong class="jxr_keyword">new</strong> ArrayList&lt;MetadataRequest&gt;( request.getRepositories().size() + 1 );
+<a class="jxr_linenumber" name="265" href="#265">265</a> 
+<a class="jxr_linenumber" name="266" href="#266">266</a>         metadataRequests.add( <strong class="jxr_keyword">new</strong> MetadataRequest( metadata, <strong class="jxr_keyword">null</strong>, request.getRequestContext() ) );
+<a class="jxr_linenumber" name="267" href="#267">267</a> 
+<a class="jxr_linenumber" name="268" href="#268">268</a>         <strong class="jxr_keyword">for</strong> ( RemoteRepository repository : request.getRepositories() )
+<a class="jxr_linenumber" name="269" href="#269">269</a>         {
+<a class="jxr_linenumber" name="270" href="#270">270</a>             MetadataRequest metadataRequest = <strong class="jxr_keyword">new</strong> MetadataRequest( metadata, repository, request.getRequestContext() );
+<a class="jxr_linenumber" name="271" href="#271">271</a>             metadataRequest.setDeleteLocalCopyIfMissing( <strong class="jxr_keyword">true</strong> );
+<a class="jxr_linenumber" name="272" href="#272">272</a>             metadataRequest.setFavorLocalRepository( <strong class="jxr_keyword">true</strong> );
+<a class="jxr_linenumber" name="273" href="#273">273</a>             metadataRequest.setTrace( trace );
+<a class="jxr_linenumber" name="274" href="#274">274</a> 
+<a class="jxr_linenumber" name="275" href="#275">275</a>             metadataRequests.add( metadataRequest );
+<a class="jxr_linenumber" name="276" href="#276">276</a>         }
+<a class="jxr_linenumber" name="277" href="#277">277</a> 
+<a class="jxr_linenumber" name="278" href="#278">278</a>         List&lt;MetadataResult&gt; metadataResults = metadataResolver.resolveMetadata( session, metadataRequests );
+<a class="jxr_linenumber" name="279" href="#279">279</a> 
+<a class="jxr_linenumber" name="280" href="#280">280</a>         Map&lt;String, VersionInfo&gt; infos = <strong class="jxr_keyword">new</strong> HashMap&lt;String, VersionInfo&gt;();
+<a class="jxr_linenumber" name="281" href="#281">281</a> 
+<a class="jxr_linenumber" name="282" href="#282">282</a>         <strong class="jxr_keyword">for</strong> ( MetadataResult metadataResult : metadataResults )
+<a class="jxr_linenumber" name="283" href="#283">283</a>         {
+<a class="jxr_linenumber" name="284" href="#284">284</a>             result.addException( metadataResult.getException() );
 <a class="jxr_linenumber" name="285" href="#285">285</a> 
-<a class="jxr_linenumber" name="286" href="#286">286</a>             <strong class="jxr_keyword">if</strong> ( StringUtils.isEmpty( result.getVersion() ) )
-<a class="jxr_linenumber" name="287" href="#287">287</a>             {
-<a class="jxr_linenumber" name="288" href="#288">288</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> VersionResolutionException( result );
-<a class="jxr_linenumber" name="289" href="#289">289</a>             }
-<a class="jxr_linenumber" name="290" href="#290">290</a>         }
+<a class="jxr_linenumber" name="286" href="#286">286</a>             ArtifactRepository repository = metadataResult.getRequest().getRepository();
+<a class="jxr_linenumber" name="287" href="#287">287</a>             <strong class="jxr_keyword">if</strong> ( repository == <strong class="jxr_keyword">null</strong> )
+<a class="jxr_linenumber" name="288" href="#288">288</a>             {
+<a class="jxr_linenumber" name="289" href="#289">289</a>                 repository = session.getLocalRepository();
+<a class="jxr_linenumber" name="290" href="#290">290</a>             }
 <a class="jxr_linenumber" name="291" href="#291">291</a> 
-<a class="jxr_linenumber" name="292" href="#292">292</a>         <strong class="jxr_keyword">if</strong> ( cacheKey != <strong class="jxr_keyword">null</strong> &amp;&amp; metadata != <strong class="jxr_keyword">null</strong> &amp;&amp; isSafelyCacheable( session, artifact ) )
-<a class="jxr_linenumber" name="293" href="#293">293</a>         {
-<a class="jxr_linenumber" name="294" href="#294">294</a>             cache.put( session, cacheKey, <strong class="jxr_keyword">new</strong> Record( result.getVersion(), result.getRepository() ) );
+<a class="jxr_linenumber" name="292" href="#292">292</a>             Versioning versioning = readVersions( session, trace, metadataResult.getMetadata(), repository, result );
+<a class="jxr_linenumber" name="293" href="#293">293</a> 
+<a class="jxr_linenumber" name="294" href="#294">294</a>             merge( request.getArtifact(), infos, versioning, repository );
 <a class="jxr_linenumber" name="295" href="#295">295</a>         }
 <a class="jxr_linenumber" name="296" href="#296">296</a> 
-<a class="jxr_linenumber" name="297" href="#297">297</a>         <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="297" href="#297">297</a>         <strong class="jxr_keyword">return</strong> infos;
 <a class="jxr_linenumber" name="298" href="#298">298</a>     }
 <a class="jxr_linenumber" name="299" href="#299">299</a> 
 <a class="jxr_linenumber" name="300" href="#300">300</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> resolve( VersionResult result, Map&lt;String, VersionInfo&gt; infos, String key )
@@ -323,300 +323,285 @@
 <a class="jxr_linenumber" name="313" href="#313">313</a>     {
 <a class="jxr_linenumber" name="314" href="#314">314</a>         Versioning versioning = <strong class="jxr_keyword">null</strong>;
 <a class="jxr_linenumber" name="315" href="#315">315</a> 
-<a class="jxr_linenumber" name="316" href="#316">316</a>         FileInputStream fis = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="317" href="#317">317</a>         <strong class="jxr_keyword">try</strong>
-<a class="jxr_linenumber" name="318" href="#318">318</a>         {
-<a class="jxr_linenumber" name="319" href="#319">319</a>             <strong class="jxr_keyword">if</strong> ( metadata != <strong class="jxr_keyword">null</strong> )
-<a class="jxr_linenumber" name="320" href="#320">320</a>             {
-<a class="jxr_linenumber" name="321" href="#321">321</a>                 SyncContext syncContext = syncContextFactory.newInstance( session, <strong class="jxr_keyword">true</strong> );
-<a class="jxr_linenumber" name="322" href="#322">322</a> 
-<a class="jxr_linenumber" name="323" href="#323">323</a>                 <strong class="jxr_keyword">try</strong>
-<a class="jxr_linenumber" name="324" href="#324">324</a>                 {
-<a class="jxr_linenumber" name="325" href="#325">325</a>                     syncContext.acquire( <strong class="jxr_keyword">null</strong>, Collections.singleton( metadata ) );
-<a class="jxr_linenumber" name="326" href="#326">326</a> 
-<a class="jxr_linenumber" name="327" href="#327">327</a>                     <strong class="jxr_keyword">if</strong> ( metadata.getFile() != <strong class="jxr_keyword">null</strong> &amp;&amp; metadata.getFile().exists() )
-<a class="jxr_linenumber" name="328" href="#328">328</a>                     {
-<a class="jxr_linenumber" name="329" href="#329">329</a>                         fis = <strong class="jxr_keyword">new</strong> FileInputStream( metadata.getFile() );
-<a class="jxr_linenumber" name="330" href="#330">330</a>                         org.apache.maven.artifact.repository.metadata.Metadata m =
-<a class="jxr_linenumber" name="331" href="#331">331</a>                             <strong class="jxr_keyword">new</strong> MetadataXpp3Reader().read( fis, false );
-<a class="jxr_linenumber" name="332" href="#332">332</a>                         versioning = m.getVersioning();
-<a class="jxr_linenumber" name="333" href="#333">333</a> 
-<a class="jxr_linenumber" name="334" href="#334">334</a>                         <em class="jxr_comment">/*</em>
-<a class="jxr_linenumber" name="335" href="#335">335</a> <em class="jxr_comment">                         * NOTE: Users occasionally misuse the id "local" for remote repos which screws up the metadata</em>
-<a class="jxr_linenumber" name="336" href="#336">336</a> <em class="jxr_comment">                         * of the local repository. This is especially troublesome during snapshot resolution so we try</em>
-<a class="jxr_linenumber" name="337" href="#337">337</a> <em class="jxr_comment">                         * to handle that gracefully.</em>
-<a class="jxr_linenumber" name="338" href="#338">338</a> <em class="jxr_comment">                         */</em>
-<a class="jxr_linenumber" name="339" href="#339">339</a>                         <strong class="jxr_keyword">if</strong> ( versioning != <strong class="jxr_keyword">null</strong> &amp;&amp; repository instanceof LocalRepository )
-<a class="jxr_linenumber" name="340" href="#340">340</a>                         {
-<a class="jxr_linenumber" name="341" href="#341">341</a>                             <strong class="jxr_keyword">if</strong> ( versioning.getSnapshot() != <strong class="jxr_keyword">null</strong> &amp;&amp; versioning.getSnapshot().getBuildNumber() &gt; 0 )
-<a class="jxr_linenumber" name="342" href="#342">342</a>                             {
-<a class="jxr_linenumber" name="343" href="#343">343</a>                                 Versioning repaired = <strong class="jxr_keyword">new</strong> Versioning();
-<a class="jxr_linenumber" name="344" href="#344">344</a>                                 repaired.setLastUpdated( versioning.getLastUpdated() );
-<a class="jxr_linenumber" name="345" href="#345">345</a>                                 Snapshot snapshot = <strong class="jxr_keyword">new</strong> Snapshot();
-<a class="jxr_linenumber" name="346" href="#346">346</a>                                 snapshot.setLocalCopy( <strong class="jxr_keyword">true</strong> );
-<a class="jxr_linenumber" name="347" href="#347">347</a>                                 repaired.setSnapshot( snapshot );
-<a class="jxr_linenumber" name="348" href="#348">348</a>                                 versioning = repaired;
-<a class="jxr_linenumber" name="349" href="#349">349</a> 
-<a class="jxr_linenumber" name="350" href="#350">350</a>                                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IOException( <span class="jxr_string">"Snapshot information corrupted with remote repository data"</span>
-<a class="jxr_linenumber" name="351" href="#351">351</a>                                     + <span class="jxr_string">", please verify that no remote repository uses the id '"</span> + repository.getId()
-<a class="jxr_linenumber" name="352" href="#352">352</a>                                     + <span class="jxr_string">"'"</span> );
-<a class="jxr_linenumber" name="353" href="#353">353</a>                             }
-<a class="jxr_linenumber" name="354" href="#354">354</a>                         }
-<a class="jxr_linenumber" name="355" href="#355">355</a>                     }
-<a class="jxr_linenumber" name="356" href="#356">356</a>                 }
-<a class="jxr_linenumber" name="357" href="#357">357</a>                 <strong class="jxr_keyword">finally</strong>
-<a class="jxr_linenumber" name="358" href="#358">358</a>                 {
-<a class="jxr_linenumber" name="359" href="#359">359</a>                     syncContext.release();
-<a class="jxr_linenumber" name="360" href="#360">360</a>                 }
-<a class="jxr_linenumber" name="361" href="#361">361</a>             }
-<a class="jxr_linenumber" name="362" href="#362">362</a>         }
-<a class="jxr_linenumber" name="363" href="#363">363</a>         <strong class="jxr_keyword">catch</strong> ( Exception e )
-<a class="jxr_linenumber" name="364" href="#364">364</a>         {
-<a class="jxr_linenumber" name="365" href="#365">365</a>             invalidMetadata( session, trace, metadata, repository, e );
-<a class="jxr_linenumber" name="366" href="#366">366</a>             result.addException( e );
-<a class="jxr_linenumber" name="367" href="#367">367</a>         }
-<a class="jxr_linenumber" name="368" href="#368">368</a>         <strong class="jxr_keyword">finally</strong>
-<a class="jxr_linenumber" name="369" href="#369">369</a>         {
-<a class="jxr_linenumber" name="370" href="#370">370</a>             IOUtil.close( fis );
-<a class="jxr_linenumber" name="371" href="#371">371</a>         }
-<a class="jxr_linenumber" name="372" href="#372">372</a> 
-<a class="jxr_linenumber" name="373" href="#373">373</a>         <strong class="jxr_keyword">return</strong> ( versioning != <strong class="jxr_keyword">null</strong> ) ? versioning : <strong class="jxr_keyword">new</strong> Versioning();
-<a class="jxr_linenumber" name="374" href="#374">374</a>     }
-<a class="jxr_linenumber" name="375" href="#375">375</a> 
-<a class="jxr_linenumber" name="376" href="#376">376</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> invalidMetadata( RepositorySystemSession session, RequestTrace trace, Metadata metadata,
-<a class="jxr_linenumber" name="377" href="#377">377</a>                                   ArtifactRepository repository, Exception exception )
-<a class="jxr_linenumber" name="378" href="#378">378</a>     {
-<a class="jxr_linenumber" name="379" href="#379">379</a>         DefaultRepositoryEvent event = <strong class="jxr_keyword">new</strong> DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
-<a class="jxr_linenumber" name="380" href="#380">380</a>         event.setMetadata( metadata );
-<a class="jxr_linenumber" name="381" href="#381">381</a>         event.setException( exception );
-<a class="jxr_linenumber" name="382" href="#382">382</a>         event.setRepository( repository );
-<a class="jxr_linenumber" name="383" href="#383">383</a> 
-<a class="jxr_linenumber" name="384" href="#384">384</a>         repositoryEventDispatcher.dispatch( event );
-<a class="jxr_linenumber" name="385" href="#385">385</a>     }
-<a class="jxr_linenumber" name="386" href="#386">386</a> 
-<a class="jxr_linenumber" name="387" href="#387">387</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( Artifact artifact, Map&lt;String, VersionInfo&gt; infos, Versioning versioning,
-<a class="jxr_linenumber" name="388" href="#388">388</a>                         ArtifactRepository repository )
-<a class="jxr_linenumber" name="389" href="#389">389</a>     {
-<a class="jxr_linenumber" name="390" href="#390">390</a>         <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( versioning.getRelease() ) )
-<a class="jxr_linenumber" name="391" href="#391">391</a>         {
-<a class="jxr_linenumber" name="392" href="#392">392</a>             merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
-<a class="jxr_linenumber" name="393" href="#393">393</a>         }
-<a class="jxr_linenumber" name="394" href="#394">394</a> 
-<a class="jxr_linenumber" name="395" href="#395">395</a>         <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( versioning.getLatest() ) )
+<a class="jxr_linenumber" name="316" href="#316">316</a>         SyncContext syncContext = syncContextFactory.newInstance( session, <strong class="jxr_keyword">true</strong> );
+<a class="jxr_linenumber" name="317" href="#317">317</a> 
+<a class="jxr_linenumber" name="318" href="#318">318</a>         <strong class="jxr_keyword">try</strong>
+<a class="jxr_linenumber" name="319" href="#319">319</a>         {
+<a class="jxr_linenumber" name="320" href="#320">320</a>             syncContext.acquire( <strong class="jxr_keyword">null</strong>, Collections.singleton( metadata ) );
+<a class="jxr_linenumber" name="321" href="#321">321</a> 
+<a class="jxr_linenumber" name="322" href="#322">322</a>             versioning = MavenMetadata.read( metadata.getFile() ).getVersioning();
+<a class="jxr_linenumber" name="323" href="#323">323</a> 
+<a class="jxr_linenumber" name="324" href="#324">324</a>             <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="325" href="#325">325</a> <em class="jxr_comment">             * NOTE: Users occasionally misuse the id "local" for remote repos which screws up the metadata</em>
+<a class="jxr_linenumber" name="326" href="#326">326</a> <em class="jxr_comment">             * of the local repository. This is especially troublesome during snapshot resolution so we try</em>
+<a class="jxr_linenumber" name="327" href="#327">327</a> <em class="jxr_comment">             * to handle that gracefully.</em>
+<a class="jxr_linenumber" name="328" href="#328">328</a> <em class="jxr_comment">             */</em>
+<a class="jxr_linenumber" name="329" href="#329">329</a>             <strong class="jxr_keyword">if</strong> ( versioning != <strong class="jxr_keyword">null</strong> &amp;&amp; repository instanceof LocalRepository )
+<a class="jxr_linenumber" name="330" href="#330">330</a>             {
+<a class="jxr_linenumber" name="331" href="#331">331</a>                 Snapshot snapshot = versioning.getSnapshot();
+<a class="jxr_linenumber" name="332" href="#332">332</a>                 <strong class="jxr_keyword">if</strong> ( snapshot != <strong class="jxr_keyword">null</strong> &amp;&amp; snapshot.getBuildNumber() &gt; 0 )
+<a class="jxr_linenumber" name="333" href="#333">333</a>                 {
+<a class="jxr_linenumber" name="334" href="#334">334</a>                     Versioning repaired = <strong class="jxr_keyword">new</strong> Versioning();
+<a class="jxr_linenumber" name="335" href="#335">335</a>                     repaired.setLastUpdated( versioning.getLastUpdated() );
+<a class="jxr_linenumber" name="336" href="#336">336</a>                     snapshot = <strong class="jxr_keyword">new</strong> Snapshot();
+<a class="jxr_linenumber" name="337" href="#337">337</a>                     snapshot.setLocalCopy( <strong class="jxr_keyword">true</strong> );
+<a class="jxr_linenumber" name="338" href="#338">338</a>                     repaired.setSnapshot( snapshot );
+<a class="jxr_linenumber" name="339" href="#339">339</a> 
+<a class="jxr_linenumber" name="340" href="#340">340</a>                     versioning = repaired;
+<a class="jxr_linenumber" name="341" href="#341">341</a> 
+<a class="jxr_linenumber" name="342" href="#342">342</a>                     <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IOException( <span class="jxr_string">"Snapshot information corrupted with remote repository data"</span>
+<a class="jxr_linenumber" name="343" href="#343">343</a>                         + <span class="jxr_string">", please verify that no remote repository uses the id '"</span> + repository.getId()
+<a class="jxr_linenumber" name="344" href="#344">344</a>                         + <span class="jxr_string">"'"</span> );
+<a class="jxr_linenumber" name="345" href="#345">345</a>                 }
+<a class="jxr_linenumber" name="346" href="#346">346</a>             }
+<a class="jxr_linenumber" name="347" href="#347">347</a>         }
+<a class="jxr_linenumber" name="348" href="#348">348</a>         <strong class="jxr_keyword">catch</strong> ( Exception e )
+<a class="jxr_linenumber" name="349" href="#349">349</a>         {
+<a class="jxr_linenumber" name="350" href="#350">350</a>             invalidMetadata( session, trace, metadata, repository, e );
+<a class="jxr_linenumber" name="351" href="#351">351</a>             result.addException( e );
+<a class="jxr_linenumber" name="352" href="#352">352</a>         }
+<a class="jxr_linenumber" name="353" href="#353">353</a>         <strong class="jxr_keyword">finally</strong>
+<a class="jxr_linenumber" name="354" href="#354">354</a>         {
+<a class="jxr_linenumber" name="355" href="#355">355</a>             syncContext.release();
+<a class="jxr_linenumber" name="356" href="#356">356</a>         }
+<a class="jxr_linenumber" name="357" href="#357">357</a> 
+<a class="jxr_linenumber" name="358" href="#358">358</a>         <strong class="jxr_keyword">return</strong> ( versioning != <strong class="jxr_keyword">null</strong> ) ? versioning : <strong class="jxr_keyword">new</strong> Versioning();
+<a class="jxr_linenumber" name="359" href="#359">359</a>     }
+<a class="jxr_linenumber" name="360" href="#360">360</a> 
+<a class="jxr_linenumber" name="361" href="#361">361</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> invalidMetadata( RepositorySystemSession session, RequestTrace trace, Metadata metadata,
+<a class="jxr_linenumber" name="362" href="#362">362</a>                                   ArtifactRepository repository, Exception exception )
+<a class="jxr_linenumber" name="363" href="#363">363</a>     {
+<a class="jxr_linenumber" name="364" href="#364">364</a>         DefaultRepositoryEvent event = <strong class="jxr_keyword">new</strong> DefaultRepositoryEvent( EventType.METADATA_INVALID, session, trace );
+<a class="jxr_linenumber" name="365" href="#365">365</a>         event.setMetadata( metadata );
+<a class="jxr_linenumber" name="366" href="#366">366</a>         event.setException( exception );
+<a class="jxr_linenumber" name="367" href="#367">367</a>         event.setRepository( repository );
+<a class="jxr_linenumber" name="368" href="#368">368</a> 
+<a class="jxr_linenumber" name="369" href="#369">369</a>         repositoryEventDispatcher.dispatch( event );
+<a class="jxr_linenumber" name="370" href="#370">370</a>     }
+<a class="jxr_linenumber" name="371" href="#371">371</a> 
+<a class="jxr_linenumber" name="372" href="#372">372</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( Artifact artifact, Map&lt;String, VersionInfo&gt; infos, Versioning versioning,
+<a class="jxr_linenumber" name="373" href="#373">373</a>                         ArtifactRepository repository )
+<a class="jxr_linenumber" name="374" href="#374">374</a>     {
+<a class="jxr_linenumber" name="375" href="#375">375</a>         <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( versioning.getRelease() ) )
+<a class="jxr_linenumber" name="376" href="#376">376</a>         {
+<a class="jxr_linenumber" name="377" href="#377">377</a>             merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
+<a class="jxr_linenumber" name="378" href="#378">378</a>         }
+<a class="jxr_linenumber" name="379" href="#379">379</a> 
+<a class="jxr_linenumber" name="380" href="#380">380</a>         <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( versioning.getLatest() ) )
+<a class="jxr_linenumber" name="381" href="#381">381</a>         {
+<a class="jxr_linenumber" name="382" href="#382">382</a>             merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
+<a class="jxr_linenumber" name="383" href="#383">383</a>         }
+<a class="jxr_linenumber" name="384" href="#384">384</a> 
+<a class="jxr_linenumber" name="385" href="#385">385</a>         <strong class="jxr_keyword">for</strong> ( SnapshotVersion sv : versioning.getSnapshotVersions() )
+<a class="jxr_linenumber" name="386" href="#386">386</a>         {
+<a class="jxr_linenumber" name="387" href="#387">387</a>             <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( sv.getVersion() ) )
+<a class="jxr_linenumber" name="388" href="#388">388</a>             {
+<a class="jxr_linenumber" name="389" href="#389">389</a>                 String key = getKey( sv.getClassifier(), sv.getExtension() );
+<a class="jxr_linenumber" name="390" href="#390">390</a>                 merge( SNAPSHOT + key, infos, sv.getUpdated(), sv.getVersion(), repository );
+<a class="jxr_linenumber" name="391" href="#391">391</a>             }
+<a class="jxr_linenumber" name="392" href="#392">392</a>         }
+<a class="jxr_linenumber" name="393" href="#393">393</a> 
+<a class="jxr_linenumber" name="394" href="#394">394</a>         Snapshot snapshot = versioning.getSnapshot();
+<a class="jxr_linenumber" name="395" href="#395">395</a>         <strong class="jxr_keyword">if</strong> ( snapshot != <strong class="jxr_keyword">null</strong> &amp;&amp; versioning.getSnapshotVersions().isEmpty() )
 <a class="jxr_linenumber" name="396" href="#396">396</a>         {
-<a class="jxr_linenumber" name="397" href="#397">397</a>             merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
-<a class="jxr_linenumber" name="398" href="#398">398</a>         }
-<a class="jxr_linenumber" name="399" href="#399">399</a> 
-<a class="jxr_linenumber" name="400" href="#400">400</a>         <strong class="jxr_keyword">for</strong> ( SnapshotVersion sv : versioning.getSnapshotVersions() )
-<a class="jxr_linenumber" name="401" href="#401">401</a>         {
-<a class="jxr_linenumber" name="402" href="#402">402</a>             <strong class="jxr_keyword">if</strong> ( StringUtils.isNotEmpty( sv.getVersion() ) )
-<a class="jxr_linenumber" name="403" href="#403">403</a>             {
-<a class="jxr_linenumber" name="404" href="#404">404</a>                 String key = getKey( sv.getClassifier(), sv.getExtension() );
-<a class="jxr_linenumber" name="405" href="#405">405</a>                 merge( SNAPSHOT + key, infos, sv.getUpdated(), sv.getVersion(), repository );
-<a class="jxr_linenumber" name="406" href="#406">406</a>             }
-<a class="jxr_linenumber" name="407" href="#407">407</a>         }
-<a class="jxr_linenumber" name="408" href="#408">408</a> 
-<a class="jxr_linenumber" name="409" href="#409">409</a>         Snapshot snapshot = versioning.getSnapshot();
-<a class="jxr_linenumber" name="410" href="#410">410</a>         <strong class="jxr_keyword">if</strong> ( snapshot != <strong class="jxr_keyword">null</strong> &amp;&amp; versioning.getSnapshotVersions().isEmpty() )
-<a class="jxr_linenumber" name="411" href="#411">411</a>         {
-<a class="jxr_linenumber" name="412" href="#412">412</a>             String version = artifact.getVersion();
-<a class="jxr_linenumber" name="413" href="#413">413</a>             <strong class="jxr_keyword">if</strong> ( snapshot.getTimestamp() != <strong class="jxr_keyword">null</strong> &amp;&amp; snapshot.getBuildNumber() &gt; 0 )
-<a class="jxr_linenumber" name="414" href="#414">414</a>             {
-<a class="jxr_linenumber" name="415" href="#415">415</a>                 String qualifier = snapshot.getTimestamp() + '-' + snapshot.getBuildNumber();
-<a class="jxr_linenumber" name="416" href="#416">416</a>                 version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
-<a class="jxr_linenumber" name="417" href="#417">417</a>             }
-<a class="jxr_linenumber" name="418" href="#418">418</a>             merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );
-<a class="jxr_linenumber" name="419" href="#419">419</a>         }
-<a class="jxr_linenumber" name="420" href="#420">420</a>     }
-<a class="jxr_linenumber" name="421" href="#421">421</a> 
-<a class="jxr_linenumber" name="422" href="#422">422</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( String key, Map&lt;String, VersionInfo&gt; infos, String timestamp, String version,
-<a class="jxr_linenumber" name="423" href="#423">423</a>                         ArtifactRepository repository )
-<a class="jxr_linenumber" name="424" href="#424">424</a>     {
-<a class="jxr_linenumber" name="425" href="#425">425</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> info = infos.get( key );
-<a class="jxr_linenumber" name="426" href="#426">426</a>         <strong class="jxr_keyword">if</strong> ( info == <strong class="jxr_keyword">null</strong> )
-<a class="jxr_linenumber" name="427" href="#427">427</a>         {
-<a class="jxr_linenumber" name="428" href="#428">428</a>             info = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a>( timestamp, version, repository );
-<a class="jxr_linenumber" name="429" href="#429">429</a>             infos.put( key, info );
-<a class="jxr_linenumber" name="430" href="#430">430</a>         }
-<a class="jxr_linenumber" name="431" href="#431">431</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( info.isOutdated( timestamp ) )
-<a class="jxr_linenumber" name="432" href="#432">432</a>         {
-<a class="jxr_linenumber" name="433" href="#433">433</a>             info.version = version;
-<a class="jxr_linenumber" name="434" href="#434">434</a>             info.repository = repository;
-<a class="jxr_linenumber" name="435" href="#435">435</a>             info.timestamp = timestamp;
-<a class="jxr_linenumber" name="436" href="#436">436</a>         }
-<a class="jxr_linenumber" name="437" href="#437">437</a>     }
-<a class="jxr_linenumber" name="438" href="#438">438</a> 
-<a class="jxr_linenumber" name="439" href="#439">439</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( Map&lt;String, VersionInfo&gt; infos, String srcKey, String dstKey )
-<a class="jxr_linenumber" name="440" href="#440">440</a>     {
-<a class="jxr_linenumber" name="441" href="#441">441</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> srcInfo = infos.get( srcKey );
-<a class="jxr_linenumber" name="442" href="#442">442</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> dstInfo = infos.get( dstKey );
-<a class="jxr_linenumber" name="443" href="#443">443</a> 
-<a class="jxr_linenumber" name="444" href="#444">444</a>         <strong class="jxr_keyword">if</strong> ( dstInfo == <strong class="jxr_keyword">null</strong>
-<a class="jxr_linenumber" name="445" href="#445">445</a>             || ( srcInfo != <strong class="jxr_keyword">null</strong> &amp;&amp; dstInfo.isOutdated( srcInfo.timestamp ) &amp;&amp; srcInfo.repository != dstInfo.repository ) )
-<a class="jxr_linenumber" name="446" href="#446">446</a>         {
-<a class="jxr_linenumber" name="447" href="#447">447</a>             infos.put( dstKey, srcInfo );
-<a class="jxr_linenumber" name="448" href="#448">448</a>         }
-<a class="jxr_linenumber" name="449" href="#449">449</a>     }
-<a class="jxr_linenumber" name="450" href="#450">450</a> 
-<a class="jxr_linenumber" name="451" href="#451">451</a>     <strong class="jxr_keyword">private</strong> String getKey( String classifier, String extension )
-<a class="jxr_linenumber" name="452" href="#452">452</a>     {
-<a class="jxr_linenumber" name="453" href="#453">453</a>         <strong class="jxr_keyword">return</strong> StringUtils.clean( classifier ) + ':' + StringUtils.clean( extension );
-<a class="jxr_linenumber" name="454" href="#454">454</a>     }
+<a class="jxr_linenumber" name="397" href="#397">397</a>             String version = artifact.getVersion();
+<a class="jxr_linenumber" name="398" href="#398">398</a>             <strong class="jxr_keyword">if</strong> ( snapshot.getTimestamp() != <strong class="jxr_keyword">null</strong> &amp;&amp; snapshot.getBuildNumber() &gt; 0 )
+<a class="jxr_linenumber" name="399" href="#399">399</a>             {
+<a class="jxr_linenumber" name="400" href="#400">400</a>                 String qualifier = snapshot.getTimestamp() + '-' + snapshot.getBuildNumber();
+<a class="jxr_linenumber" name="401" href="#401">401</a>                 version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
+<a class="jxr_linenumber" name="402" href="#402">402</a>             }
+<a class="jxr_linenumber" name="403" href="#403">403</a>             merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );
+<a class="jxr_linenumber" name="404" href="#404">404</a>         }
+<a class="jxr_linenumber" name="405" href="#405">405</a>     }
+<a class="jxr_linenumber" name="406" href="#406">406</a> 
+<a class="jxr_linenumber" name="407" href="#407">407</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( String key, Map&lt;String, VersionInfo&gt; infos, String timestamp, String version,
+<a class="jxr_linenumber" name="408" href="#408">408</a>                         ArtifactRepository repository )
+<a class="jxr_linenumber" name="409" href="#409">409</a>     {
+<a class="jxr_linenumber" name="410" href="#410">410</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> info = infos.get( key );
+<a class="jxr_linenumber" name="411" href="#411">411</a>         <strong class="jxr_keyword">if</strong> ( info == <strong class="jxr_keyword">null</strong> )
+<a class="jxr_linenumber" name="412" href="#412">412</a>         {
+<a class="jxr_linenumber" name="413" href="#413">413</a>             info = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a>( timestamp, version, repository );
+<a class="jxr_linenumber" name="414" href="#414">414</a>             infos.put( key, info );
+<a class="jxr_linenumber" name="415" href="#415">415</a>         }
+<a class="jxr_linenumber" name="416" href="#416">416</a>         <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> ( info.isOutdated( timestamp ) )
+<a class="jxr_linenumber" name="417" href="#417">417</a>         {
+<a class="jxr_linenumber" name="418" href="#418">418</a>             info.version = version;
+<a class="jxr_linenumber" name="419" href="#419">419</a>             info.repository = repository;
+<a class="jxr_linenumber" name="420" href="#420">420</a>             info.timestamp = timestamp;
+<a class="jxr_linenumber" name="421" href="#421">421</a>         }
+<a class="jxr_linenumber" name="422" href="#422">422</a>     }
+<a class="jxr_linenumber" name="423" href="#423">423</a> 
+<a class="jxr_linenumber" name="424" href="#424">424</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> merge( Map&lt;String, VersionInfo&gt; infos, String srcKey, String dstKey )
+<a class="jxr_linenumber" name="425" href="#425">425</a>     {
+<a class="jxr_linenumber" name="426" href="#426">426</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> srcInfo = infos.get( srcKey );
+<a class="jxr_linenumber" name="427" href="#427">427</a>         <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a> dstInfo = infos.get( dstKey );
+<a class="jxr_linenumber" name="428" href="#428">428</a> 
+<a class="jxr_linenumber" name="429" href="#429">429</a>         <strong class="jxr_keyword">if</strong> ( dstInfo == <strong class="jxr_keyword">null</strong>
+<a class="jxr_linenumber" name="430" href="#430">430</a>             || ( srcInfo != <strong class="jxr_keyword">null</strong> &amp;&amp; dstInfo.isOutdated( srcInfo.timestamp ) &amp;&amp; srcInfo.repository != dstInfo.repository ) )
+<a class="jxr_linenumber" name="431" href="#431">431</a>         {
+<a class="jxr_linenumber" name="432" href="#432">432</a>             infos.put( dstKey, srcInfo );
+<a class="jxr_linenumber" name="433" href="#433">433</a>         }
+<a class="jxr_linenumber" name="434" href="#434">434</a>     }
+<a class="jxr_linenumber" name="435" href="#435">435</a> 
+<a class="jxr_linenumber" name="436" href="#436">436</a>     <strong class="jxr_keyword">private</strong> String getKey( String classifier, String extension )
+<a class="jxr_linenumber" name="437" href="#437">437</a>     {
+<a class="jxr_linenumber" name="438" href="#438">438</a>         <strong class="jxr_keyword">return</strong> StringUtils.clean( classifier ) + ':' + StringUtils.clean( extension );
+<a class="jxr_linenumber" name="439" href="#439">439</a>     }
+<a class="jxr_linenumber" name="440" href="#440">440</a> 
+<a class="jxr_linenumber" name="441" href="#441">441</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
+<a class="jxr_linenumber" name="442" href="#442">442</a>     {
+<a class="jxr_linenumber" name="443" href="#443">443</a>         <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="444" href="#444">444</a> <em class="jxr_comment">         * The workspace/reactor is in flux so we better not assume definitive information for any of its</em>
+<a class="jxr_linenumber" name="445" href="#445">445</a> <em class="jxr_comment">         * artifacts/projects.</em>
+<a class="jxr_linenumber" name="446" href="#446">446</a> <em class="jxr_comment">         */</em>
+<a class="jxr_linenumber" name="447" href="#447">447</a> 
+<a class="jxr_linenumber" name="448" href="#448">448</a>         WorkspaceReader workspace = session.getWorkspaceReader();
+<a class="jxr_linenumber" name="449" href="#449">449</a>         <strong class="jxr_keyword">if</strong> ( workspace == <strong class="jxr_keyword">null</strong> )
+<a class="jxr_linenumber" name="450" href="#450">450</a>         {
+<a class="jxr_linenumber" name="451" href="#451">451</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="452" href="#452">452</a>         }
+<a class="jxr_linenumber" name="453" href="#453">453</a> 
+<a class="jxr_linenumber" name="454" href="#454">454</a>         Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
 <a class="jxr_linenumber" name="455" href="#455">455</a> 
-<a class="jxr_linenumber" name="456" href="#456">456</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
-<a class="jxr_linenumber" name="457" href="#457">457</a>     {
-<a class="jxr_linenumber" name="458" href="#458">458</a>         <em class="jxr_comment">/*</em>
-<a class="jxr_linenumber" name="459" href="#459">459</a> <em class="jxr_comment">         * The workspace/reactor is in flux so we better not assume definitive information for any of its</em>
-<a class="jxr_linenumber" name="460" href="#460">460</a> <em class="jxr_comment">         * artifacts/projects.</em>
-<a class="jxr_linenumber" name="461" href="#461">461</a> <em class="jxr_comment">         */</em>
-<a class="jxr_linenumber" name="462" href="#462">462</a> 
-<a class="jxr_linenumber" name="463" href="#463">463</a>         WorkspaceReader workspace = session.getWorkspaceReader();
-<a class="jxr_linenumber" name="464" href="#464">464</a>         <strong class="jxr_keyword">if</strong> ( workspace == <strong class="jxr_keyword">null</strong> )
-<a class="jxr_linenumber" name="465" href="#465">465</a>         {
-<a class="jxr_linenumber" name="466" href="#466">466</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="467" href="#467">467</a>         }
-<a class="jxr_linenumber" name="468" href="#468">468</a> 
-<a class="jxr_linenumber" name="469" href="#469">469</a>         Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact );
-<a class="jxr_linenumber" name="470" href="#470">470</a> 
-<a class="jxr_linenumber" name="471" href="#471">471</a>         <strong class="jxr_keyword">return</strong> workspace.findArtifact( pomArtifact ) == <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="472" href="#472">472</a>     }
-<a class="jxr_linenumber" name="473" href="#473">473</a> 
-<a class="jxr_linenumber" name="474" href="#474">474</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a>
-<a class="jxr_linenumber" name="475" href="#475">475</a>     {
-<a class="jxr_linenumber" name="476" href="#476">476</a> 
-<a class="jxr_linenumber" name="477" href="#477">477</a>         String timestamp;
-<a class="jxr_linenumber" name="478" href="#478">478</a> 
-<a class="jxr_linenumber" name="479" href="#479">479</a>         String version;
-<a class="jxr_linenumber" name="480" href="#480">480</a> 
-<a class="jxr_linenumber" name="481" href="#481">481</a>         ArtifactRepository repository;
-<a class="jxr_linenumber" name="482" href="#482">482</a> 
-<a class="jxr_linenumber" name="483" href="#483">483</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/maven/repository/internal/DefaultVersionResolver.html">VersionInfo</a>( String timestamp, String version, ArtifactRepository repository )
-<a class="jxr_linenumber" name="484" href="#484">484</a>         {
-<a class="jxr_linenumber" name="485" href="#485">485</a>             <strong class="jxr_keyword">this</strong>.timestamp = ( timestamp != <strong class="jxr_keyword">null</strong> ) ? timestamp : <span class="jxr_string">""</span>;
-<a class="jxr_linenumber" name="486" href="#486">486</a>             <strong class="jxr_keyword">this</strong>.version = version;
-<a class="jxr_linenumber" name="487" href="#487">487</a>             <strong class="jxr_keyword">this</strong>.repository = repository;
-<a class="jxr_linenumber" name="488" href="#488">488</a>         }
-<a class="jxr_linenumber" name="489" href="#489">489</a> 

[... 260 lines stripped ...]


Mime
View raw message