Skip to content
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

Snapshots are allowed when running gitflow release start #182

Closed
manderson23 opened this issue Jun 17, 2019 · 8 comments · Fixed by #204
Closed

Snapshots are allowed when running gitflow release start #182

manderson23 opened this issue Jun 17, 2019 · 8 comments · Fixed by #204

Comments

@manderson23
Copy link

If I run the following command with snapshot dependencies in the pom

mvn gitflow:release-start -DpushRemote=true -DversionDigitToIncrement=1 -DcommitDevelopmentVersionAtStart=true

the command succeeds even though allowSnapshots should be using the default value of false.

I think this is a regression introduced when an issue related to snapshots that I previously reported was fixed - #169

@aleksandr-m
Copy link
Owner

@manderson23 Cannot reproduce. Can you create a simple test project.

@Opa-
Copy link

Opa- commented Aug 6, 2019

I had the same issue and had to downgrade the plugin to v1.11.0

@glianeric
Copy link

I have created a very, very dirty 'fix' for this, which is why I'm not submitting it as a PR right now. I basically added an enforcer run just before the merge, which runs the requirereleasedeps enforcer rule on the project. I still believe that fixing up @aleksandr-m function is a much better solution, but for now I can run with 'allowSnapshots', while my addition catches any unwanted snapshots.

@aleksandr-m
Copy link
Owner

@manderson23 @Opa- @glianeric reprex please or mcve or mwe.

@aekrylov
Copy link

@aleksandr-m It seems that snapshots versions aren't checked properly when the version is defined in a property. Here's a minimal example: https://github.com/aekrylov/snapshots-reprex/tree/develop

@manderson23
Copy link
Author

manderson23 commented Sep 19, 2019 via email

@cidus
Copy link
Contributor

cidus commented Oct 7, 2019

I have encountered this issue as well, and have verified it with a dummy project.

This will be properly checked:

	<dependencies>
		<dependency>
			<groupId>world.hello</groupId>
			<artifactId>dummy-library</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

This will not:

	<properties>
		<dummy-library.version>1.0.0-SNAPSHOT</dummy-library.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>world.hello</groupId>
			<artifactId>dummy-library</artifactId>
			<version>${dummy-library.version}</version>
		</dependency>
	</dependencies>

@cidus
Copy link
Contributor

cidus commented Oct 8, 2019

I replaced readModel with reloadProject which uses ProjectBuilder in order to recompute all project info, it should resolve transitive dependencies and property versions.
PR #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants