Incomplete JAR Due to Parallel Build Tasks
Symptoms
If the build environment is abnormal or the build mode is improper, the generated JAR package may be missing, but the build result is successful. As a result, the problem is difficult to locate.
- Prerequisites: Project A depends on project B. Projects A and B are built concurrently. Dependencies A and B are uploaded at the same time. This scenario occurs when different users run different build tasks together or the build tasks are configured to run in parallel in the pipeline.
- Build results: Both build task A and build task B succeeded.
- Problem: Artifact B is normal, but artifact A is occasionally incomplete.
Cause Analysis
If project A depends on project B and projects A and B are built at the same time, there is a possibility that when A starts to download dependency B, B is still being uploaded. As a result, A cannot obtain the full content of artifact B.
Solution
- Find out all self-developed projects that A depends on: B1, B2, ... Bn.
- Check the pipeline to see whether project A and project Bn are configured to run in parallel.
- If they run in parallel, edit the pipeline configurations to make A and B run in serial.
- If they do not run in serial, check the build history or build time of A and B to confirm whether they had run concurrently.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot