In your Cloud9 environment, create a buildspec.yml file in the DemoApp repository with the following content:
version: 0.2 phases: install: runtime-versions: java: corretto8 build: commands: - mvn install artifacts: files: - target/javawebdemo.war - appspec.yml - scripts/**/* discard-paths: no
Here’s what it looks like in action:
Commit your changes to the local Git repository and push your changes to the CodeCommit-hosted repository.
cd ~/environment/DemoApp git add . git commit -m "Add buildspec" git push