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

lateinit property nexusClient has not been initialized #524

Closed
nicolasfara opened this issue Mar 1, 2023 · 8 comments
Closed

lateinit property nexusClient has not been initialized #524

nicolasfara opened this issue Mar 1, 2023 · 8 comments
Labels

Comments

@nicolasfara
Copy link
Contributor

When executing ./gradlew drop the following error is raised:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dropStagingRepositoryOnMavenCentral'.
> lateinit property nexusClient has not been initialized
@DanySK
Copy link
Owner

DanySK commented Mar 2, 2023

Ah! Drop was not designed to be used alone. I need to look into this

@DanySK
Copy link
Owner

DanySK commented Mar 2, 2023

Can you provide a build scan?

@nicolasfara
Copy link
Contributor Author

Can you provide a build scan?

Sure: https://scans.gradle.com/s/bv4q2b3idnzcw

@DanySK
Copy link
Owner

DanySK commented Mar 2, 2023

the culprit

@DanySK
Copy link
Owner

DanySK commented Mar 2, 2023

We need to rethink what the plugin is meant to do, because it is currently designed for a single-run pipeline maven-style.
I want to preserve the pipeline, so something like uploadAll release must work (hence, release dependsOn close).
OTOH, release should work on a repo that has already been closed.

Nexus related operations:

  • createNexusClient

  • createStagingRepository

  • upload

  • close

  • release

  • drop

  • createNexusClient must always run if any of the Nexus-related operations are invoked.

  • createStagingRepository has the wrong name; it should be findOrCreateStagingRepository, the way it is implemented now.

  • upload tasks are optional. They just need to be ran after createStagingRepository

  • close must run after upload and gracefully skip if the repo is already closed

  • release must run after close

  • drop is mutually exclusive with release, must run after close, must run after all the uploads whether or not close is scheduled

This should support both a "one shot" pipeline and a multi-stage pipeline, doesn't it?

DanySK added a commit that referenced this issue Mar 2, 2023
@DanySK
Copy link
Owner

DanySK commented Mar 2, 2023

@nicolasfara I prepared a patch in #525, but I'd like to have a regression test before merging. Can you prepare an additional test to be performed in CI and target branch test/524 with a PR? I will then open a PR test/524 -> master to ensure that the test "fails correctly" and a PR fix/525 -> test/524 to ensure that it is indeed fixed.

DanySK added a commit that referenced this issue Mar 3, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
@DanySK
Copy link
Owner

DanySK commented Mar 4, 2023

Fixed in #525 which will be merged soon. Reopen if the fix does not work.

@DanySK DanySK closed this as completed Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK added a commit that referenced this issue Mar 4, 2023
DanySK pushed a commit that referenced this issue Mar 4, 2023
## [3.3.3](3.3.2...3.3.3) (2023-03-04)

### Bug Fixes

* **drop:** drop now depends on staging repository creation, and runs after all uploads. Fixes [#524](#524) ([41d00ba](41d00ba))

### Build and continuous integration

* fix indentation ([8a1a7bc](8a1a7bc))
* **test:** add regression test on drop gradle task ([a147f2b](a147f2b))

### Dependency updates

* **deps:** update plugin publishoncentral to v3.3.2 ([74ba25d](74ba25d))
@github-actions
Copy link

github-actions bot commented Mar 4, 2023

🎉 This issue has been resolved in version 3.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants