GitLab CI/CD package and deploy stage taking too much

We have implemented GitLab CI/CD pipeline for our maven project. We have create 4 stages - codebuild, codetest, codepackage and codedeploy in .gitlab-ci.yml file. We are using 1 runner and do not have parallel pipelines enabled. We have also enabled the cache option. Our codepackage takes around 4 minutes 22 seconds and codedeploy stage takes around 4 minutes 10 seconds which is too long. In total it takes around 10 minutes which is too long for a smaller project.

Is this an issue from GitLab’s side or is there something we can do to speed up the process? Thank you!

Please find attached the .yml file screenshot for codepackage stage.