This job is stuck, because the project doesn't have any runners online assigned to it. Go to Runners page
The job is stuck because your runners have tags but your jobs don't. Follow these 4 steps to enable your runner to run without tags:
Or set tags to your jobs. For more info: Configuration of your jobs with .gitlab-ci.yml - Tags
Make sure you are using the correct tag i.e. whatever present corresponding to the configured runner for your project.
In your case it would be like :
maven-build:
image: maven:3-jdk-8
stage: build
tags: my project ci-cd
script: "mvn package -B"
artifacts:
paths:
- target/*.jar