mojohaus / versions

Versions Maven Plugin
https://www.mojohaus.org/versions/versions-maven-plugin/
Apache License 2.0
337 stars 267 forks source link

2.16.1 - failed test it-display-plugin-updates-006 #1009

Closed slawekjaranowski closed 1 year ago

slawekjaranowski commented 1 year ago

Test it-display-plugin-updates-006 has execution

invoker.goals=versions:display-plugin-updates

so the latest release version is used ....

After release new version - test are failing, we need investigate if release doesn't not introduce a new bug

jarmoniuk commented 1 year ago

I don't get why they were testing a release version instead of the current snapshot. The test should be testing the current snapshot and not the release version.

I need to verify this, but it looks like the message that is output to the log has changed. If you look at Maven output, you can see that all updates, including the one that there's checked for:

p = Pattern.compile( "maven-deploy-plugin \\.+ 2\\.3 ->" );
    m = p.matcher( buf.toString() );
    if ( !m.find() )
    {
        System.out.println( "cannot find update of deploy plugin");
        return false;
    }   

are actually there, so the test should pass. I think the string announcing the updates has changed (not sure) and that's why it's now failing. See: https://github.com/mojohaus/versions/actions/runs/6240751197/job/16952395061

[INFO] All plugins with a version specified are using the latest versions.
[INFO] 
Warning:  The following plugins do not have their version specified:
Warning:    localhost:dummy-maven-plugin ............................... 3.1
[INFO] 
Warning:  Project does not define minimum Maven version required for build
[INFO] Plugins require minimum Maven version of: 3.8.4
[INFO] 
Error:  Project does not define required minimum version of Maven.
Error:  Update the pom.xml to contain maven-enforcer-plugin to
Error:  force the Maven version which is needed to build this project.
Error:  See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
Error:  Using the minimum version of Maven: 3.8.4
[INFO] 
[INFO] Require Maven 2.0 to use the following plugin updates:
[INFO]   maven-clean-plugin ............................................ 2.2
[INFO]   maven-deploy-plugin .................................... 2.3 -> 2.4
[INFO]   maven-install-plugin .......................................... 2.2
[INFO] 
[INFO] Require Maven 2.0.2 to use the following plugin updates:
[INFO]   maven-site-plugin ............................... 2.0 -> 2.0-beta-7
[INFO] 
[INFO] Require Maven 2.0.6 to use the following plugin updates:
[INFO]   localhost:dummy-maven-plugin ........................... 3.1 -> 3.0
[INFO]   maven-clean-plugin ..................................... 2.2 -> 2.5
[INFO]   maven-deploy-plugin .................................. 2.3 -> 2.8.1
[INFO]   maven-install-plugin ................................. 2.2 -> 2.5.1
[INFO]   maven-site-plugin .................................... 2.0 -> 2.0.1
[INFO] 
[INFO] Require Maven 2.1.0 to use the following plugin updates:
[INFO]   maven-site-plugin .................................... 2.0 -> 2.1.1
[INFO] 
[INFO] Require Maven 2.2.0 to use the following plugin updates:
[INFO]   maven-site-plugin ...................................... 2.0 -> 3.0
[INFO] 
[INFO] Require Maven 2.2.1 to use the following plugin updates:
[INFO]   maven-clean-plugin ................................... 2.2 -> 2.6.1
[INFO]   maven-deploy-plugin .................................. 2.3 -> 2.8.2
[INFO]   maven-install-plugin ................................. 2.2 -> 2.5.2
[INFO]   maven-site-plugin .................................... 2.0 -> 3.7.1
[INFO] 
[INFO] Require Maven 3.0 to use the following plugin updates:
[INFO]   maven-clean-plugin ................................... 2.2 -> 3.1.0
[INFO]   maven-deploy-plugin ............................... 2.3 -> 3.0.0-M2
[INFO]   maven-install-plugin .............................. 2.2 -> 3.0.0-M1
[INFO]   maven-site-plugin .................................... 2.0 -> 3.9.0
[INFO] 
[INFO] Require Maven 3.0.5 to use the following plugin updates:
[INFO]   maven-site-plugin ................................... 2.0 -> 3.11.0
[INFO] 
[INFO] Require Maven 3.2.5 to use the following plugin updates:
[INFO]   maven-clean-plugin ................................... 2.2 -> 3.3.1
[INFO]   maven-deploy-plugin .................................. 2.3 -> 3.1.1
[INFO]   maven-install-plugin ................................. 2.2 -> 3.1.1
[INFO]   maven-site-plugin ................................. 2.0 -> 4.0.0-M9
[INFO] 
[INFO] Require Maven 3.8.4 to use the following plugin updates:
[INFO]   localhost:dummy-maven-plugin .................................. 3.1
slawekjaranowski commented 1 year ago

I see that some of test was changed in https://github.com/mojohaus/versions/pull/996 This one has a wrong execution defined so was overlooked

should be:

invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:display-plugin-updates

instead of:

invoker.goals=versions:display-plugin-updates

and after release the problem became apparent

jarmoniuk commented 1 year ago

Looks like my own mistake 🤣