Why Is the New Package Still Built from the Old Code Even After the Code Has Been Updated?
Symptoms
The local code is committed to a remote repository and the code in the remote repository has been updated. However, the code in the package generated after the build is decompressed and decompiled is still the old code.
Cause Analysis
Generally, this problem occurs because the user accidentally uploads the locally compiled file (in the target directory) to the remote repository and does not perform the clean operation before packaging.
Solution
- Method 1: Delete the target directory of the remote repository.
- Method 2: Add the clean parameter to the packaging command. For example, if the original packaging command is mvn package -Dmaven.test.skip=true -U -e -X -B, the following information is displayed after the clean parameter is added:
mvn clean package -Dmaven.test.skip=true -U -e -X -B
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