did you remember to add a -U to your command line to force maven to
recheck for newer plugin versions?

On 29 May 2012 21:36, Curtis Rueden <[email protected]> wrote:
> Hi Stephen & everyone,
>
> After seeing the release announcement for maven-compiler-plugin 2.5 (yay), I
> thought I would update the plugin versions in my toplevel organization POM.
> So naturally I ran "mvn versions:display-plugin-updates". However, I was
> surprised to see that it still detected version 2.3.2 as the latest version
> of maven-compiler-plugin.
>
> I mocked up a little example that demonstrates:
>     https://gist.github.com/2830363
>
> The problem occurs with Maven 3.0.4, but not with Maven 2.2.1.
>
> I dove into the source code of versions-maven-plugin a bit to try and debug:
>
> The problem seems to come down to a method call in:
>
> org.codehaus.mojo.versions.api.DefaultVersionsHelper.lookupArtifactVersions(
> Artifact artifact, boolean usePluginRepositories )
>
> Specifically:
>
>         ArtifactVersions artifactVersions = new ArtifactVersions( artifact,
>
> artifactMetadataSource.retrieveAvailableVersions( artifact, localRepository,
>        remoteRepositories ),
>                                      getVersionComparator( artifact ) );
>
> Variable values are:
>
> artifactVersions =
> ArtifactVersions{artifact=org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.3.1:runtime,
> versions=[2.0-beta-1, 2.0, 2.0.1, 2.0.2, 2.1, 2.2, 2.3, 2.3.1, 2.3.2],
> versionComparator=org.codehaus.mojo.versions.ordering.MavenVersionComparator@256f8834}
> localRepository =        id: local
>       url: file:///Users/curtis/.m2/repository/
>    layout: none
>
> remoteRepositories = [       id: central
>       url: http://repo.maven.apache.org/maven2
>    layout: default
>
> So really the problem is in Maven core, in
> maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
> in the retrieveAvailableVersions methods. Before digging any deeper I
> figured I'd ask on this list.
>
> However, I did look on Maven Central
> (http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/)
> and all seems to be in order there: versions 2.4 and 2.5 exist as expected.
> I also checked my local repository cache and found version 2.5 sitting there
> too (not 2.4, since my projects have never referenced it).
>
> Any ideas on what could be the problem? Am I missing something obvious? Is
> this a bug?
>
> I'm paranoid now, wondering whether any of my other plugin versions are out
> of date, and versions-maven-plugin isn't telling me...
>
> Thanks,
> Curtis
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to