# This is a sample build configuration for Java (Maven).
# Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: maven:3.6.0
pipelines:
default:
- step:
name: Clean Build
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B clean # -B batch mode makes Maven less verbose
- step:
name: Compile build
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B compile # -B batch mode makes Maven less verbose
- step:
name: Package build
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B package # -B batch mode makes Maven less verbose
artifacts:
- target/**
- step:
name: Deployment
deployment: test
script:
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.3
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: $APPLICATION_NAME
ENVIRONMENT_NAME: $ENVIRONMENT_NAME
S3_BUCKET: $S3_BUCKET
ZIP_FILE: 'target/ezstore-1.0.jar'
above is my pipeline, when it run, i can see from build set up,cache is extracted
<span>Cache "maven": Downloading</span><span>Cache <br>"maven": Downloaded 1.7 MiB in 2 seconds</span><span>Cache <br>"maven": Extracting</span><span>Cache <br>"maven": Extracted in 0 seconds<br><br>However, I can still see cache is not use and it keep download from maven central<br><br>[INFO] Scanning for projects...[INFO] [INFO] --------------------------< edu.mum:ezstore >---------------------------<br>[INFO] Building EZStore API 1.0[INFO] --------------------------------[ jar ]---------------------------------<br>[INFO] Downloading from central: <a href="https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.pom" target="_blank" rel="noopener nofollow noreferrer">https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.pom<br></a>[INFO] Downloaded from central: <a href="https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.pom" target="_blank" rel="noopener nofollow noreferrer">https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.pom</a> (7.2 kB at 34 kB/s)<br>[INFO] Downloading from central: <a href="https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.jar" target="_blank" rel="noopener nofollow noreferrer">https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.jar</a><br><br>Please let me know what is wrong with it</span>