version: 0.2 phases: install: runtime-versions: java: openjdk8 python: 3.7 commands: - pip install --upgrade 'six==1.15.0' - pip install --upgrade 'boto3==1.24.4' - pip install --upgrade 'urllib3==1.26.9' - pip install --upgrade 'botocore==1.27.4' - pip install --upgrade 'pyyaml==5.4.1' - pip install --upgrade 'requests==2.27.1' - pip install pre-commit cloudformation-cli-java-plugin build: commands: - pre-commit run --all-files - | if [ "$(ls -A $CODEBUILD_SRC_DIR)" ]; then cd $CODEBUILD_SRC_DIR # build the parent that refers to dependent modules mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean verify --no-transfer-progress if [ "$?" -ne 0 ] ; then echo "Build failed!" exit 1 else cd ".." fi else echo "$CODEBUILD_SRC_DIR is empty" fi