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

Close all repositories #27

Open
DanySK opened this issue Oct 6, 2016 · 6 comments
Open

Close all repositories #27

DanySK opened this issue Oct 6, 2016 · 6 comments

Comments

@DanySK
Copy link

DanySK commented Oct 6, 2016

When running multiple, parallel builds, I often get errors such as:

Execution failed for task ':closeRepository'.
Wrong number of received repositories in state 'open'. Expected 1, received 4

It would be nice to have a way to force the closure of all four open repos.

@szpak
Copy link
Member

szpak commented Oct 6, 2016

In my opinion it would be dangerous. Image a situation that to some of those repositories are still being uploaded with artifacts. Closing too early would provide not fully complete release.

It would be best to be able to recognize the repository you uploaded artifacts to and close just that one. Unfortunately uploadArchives task doesn't seem to provide necessary information. I'm not even sure if Nexus supports it.

As an another side effect it can be possible that two subsequent builds would upload two different versions to the same staging repository in the situation that closing the repository in the first build failed.

@mariuszs does maven-staging-plugin support identifying staging repositories by name?

@DanySK
Copy link
Author

DanySK commented Oct 10, 2016

@szpak, I agree that it could be dangerous, and such danger should be properly advised, but it is ultimately the user's responsibility to choose whether or not using a feature marked as dangerous.

I also agree that closing by name would be best.

@kylerjensen
Copy link

If I'm not mistaken, the Nexus Staging Maven Plugin closes all open repositories by default. Implementing this feature, even by adding a configurable option for the user, would allow for a more seamless transition between the two plugins.

@deanhiller
Copy link

I 200% agree with @szpak here @Kjens93 BUT I have a better solution for you in issue #29

If that gets implemented, then you close repository with the staging id so it only closes that one that you care about. I ran into that error a lot myself and it was confusing.

@JavierSegoviaCordoba
Copy link

I would like to have this too. Currently, I am publishing a multiplatform project with GitHub Actions. This project needs to use two machines, Windows and macOS. So I am getting two repositories. I would like to be able to have a flag for closing all repositories.

@lamba92
Copy link

lamba92 commented Feb 6, 2021

Exactly my same problem. Yet the task actually hang forever instead of erroring, which is kind of strange...

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

No branches or pull requests

6 participants