-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.12.0 - allowSnapshots don't find last snapshot with plugin version 2.12.0 #690
Comments
Looking into it. |
Similar to #670, fixed by PR #671 Verified by:
mvn org.codehaus.mojo:versions-maven-plugin:2.12.1-SNAPSHOT:update-parent -DallowSnapshots=true "-DparentVersion=[0,71-SNAPSHOT]"
@Test
public void testShouldUpgradeToSnapshot() throws MojoExecutionException, XMLStreamException, MojoFailureException
{
mojo.getProject().setParent( new MavenProject()
{{
setGroupId( "default-group" );
setArtifactId( "parent-artifact" );
setVersion( "0.9.0" );
}} );
mojo.allowSnapshots = true;
mojo.parentVersion = "[0,1.0.1-SNAPSHOT]";
try ( MockedStatic<PomHelper> pomHelper = mockStatic( PomHelper.class ) )
{
pomHelper.when( () -> PomHelper.setProjectParentVersion( any(), any() ) ).thenReturn( true );
mojo.update( null );
}
assertThat( changeRecorder.getChanges(),
hasItem( new VersionChange( "default-group", "parent-artifact", "0.9.0",
"1.0.1-SNAPSHOT" ) ) );
} Appears to be fixed. |
@slawekjaranowski should I add this unit test to the suite? (will slow down compilation ever so slightly ;) ) |
yes, please open PR |
andrzejj0
added a commit
to andrzejj0/versions-maven-plugin
that referenced
this issue
Sep 18, 2022
slachiewicz
pushed a commit
that referenced
this issue
Sep 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Since last release (2.12.0) few day ago, update-parent goal don't find last snapshot push.
mvn version:update-parent "DparentVersion=[0,2.76-SNAPSHOT]" -DallowSnapshots=true -U
We force to use 2.11.0 and plugin found last snapshot version.
mvn org.codehaus.mojo:version-maven-plugin:2.11.0:update-parent "DparentVersion=[0,2.76-SNAPSHOT]" -DallowSnapshots=true -U
Something have change with allowSnapshots to allow him to check snapshot version ?
The text was updated successfully, but these errors were encountered: