Skip to content

Conversation

stefanseifert
Copy link
Contributor

@stefanseifert stefanseifert commented Jan 4, 2022

add integration tests to cover SNAPSHOT dependency check

please note: when implementing the integration tests i realized that the mvn calls that are done internally by gitflow-maven-plugin to call versions-maven-plugin do not pass over the maven settings that are used for the main maven call. this may create problems in other scenarios as well, in this case a handed over the invoker test maven settings manually via argLine in the integration tests.

Fixes #64

@stefanseifert
Copy link
Contributor Author

the problem with the maven settings in integration tests could be solved more elegant with #248

@aleksandr-m
Copy link
Owner

@stefanseifert Why do you need mrm plugin?

@stefanseifert
Copy link
Contributor Author

to set up a mock maven repository for the integration test - it contains a dummy snapshot parent dependency. without this, the IT cannot run because it cannot resolve the parent.

@stefanseifert
Copy link
Contributor Author

it's the same test setup as used by https://github.com/mojohaus/versions-maven-plugin

@aleksandr-m
Copy link
Owner

Can it be in test scope? And under run-its profile?

Usually this plugin should be run from the parent project. How versions will be updated if that is not the case?

@stefanseifert
Copy link
Contributor Author

it makes totally sense to move it to "run-its" profile, same place as the maven-invoker-plugin which it supports, will update the PR.
it is only required for the ITs of this plugin - not sure what you mean with "parent project".

@aleksandr-m
Copy link
Owner

I think you can put parent pom directly in the test folder. Take a look at this integration test.

@stefanseifert
Copy link
Contributor Author

you're right - the ITs can be simplified to avoid the usage of a mock maven repository - will update the PR.

it's a bit more inflexible without that, though. once we have an IT that really needs to resolver a dependency from a maven repository we might need it again. but for this PRs it's sufficient without.

@aleksandr-m
Copy link
Owner

Looks good. Can you remove build section from the dummy parent and force push it. Then I'll approve and merge.

@stefanseifert
Copy link
Contributor Author

it's removed

@aleksandr-m
Copy link
Owner

Sorry, I wasn't clear enough in my last comment. Can you squash all commits in a single one and force push it.

…tion

add integration tests to cover SNAPSHOT dependency check
@stefanseifert stefanseifert force-pushed the feature/issue64-parent-snapshot-check branch from 9e59af6 to d2dfaeb Compare January 8, 2022 07:40
@aleksandr-m aleksandr-m merged commit 7482fdb into aleksandr-m:master Jan 8, 2022
@aleksandr-m
Copy link
Owner

Good. Thank you.

@stefanseifert
Copy link
Contributor Author

thanks for merging! - when do you plan the next release?

@aleksandr-m
Copy link
Owner

1.18.0 is released.

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 this pull request may close these issues.

Plugin Allows Releases of Projects with SNAPSHOT parent POMs

2 participants