Issue
Let's assume that we have a maven project with following structure:
projectAlfa (e.g. Snapshot)
- componentA
- componentB
- componentC
In the middle of the deployment phase (e.g. when uploading ComponentC) of artefacts to Nexus, the Jenkins job fails due to network problems.
Questions:
- Will be at all the first two components (A and B) be uploaded to nexus?
- If I request the commit hash of projectAlfa, what would I get? Will the components of projectAlfa have different states/commit hashes (e.g. artefacts of components A and B have different states/commit hashes then C)?
The goal is, to get the git commit hash of snapshot artefacts. I need this information as it helps me to define, based on which git commit-hash was built uploaded snapshot artefacts on nexus.
Solution
Ok, I start to understand.
If you build the project, and A and B get deployed, but C not, then the latest SNAPSHOT of A and B will belong to a different commit hash than the one of C.
The maven deploy plugin has an experimental "deployAtEnd" parameter to avoid that.
Answered By - J Fabian Meier