I have a multi module maven project i want do build and deploy with AWS Codestar on EC2. This almost works like a charm now.
- Local build works, app can be accessed on port 5000.
- Codestar build is ok, upload is ok, deployment seems to be ok. But i cannot reach the app on port 80 (404 not found). SERVER_PORT is set to 5000, should be translated to 80 on AWS.
Now the funny thing about the story: if i deploy the WAR manually (local or downloaded from CodeBuild), both can be accessed on AWS on port 80. But the Codestar uploaded and deployed one cannot.
I'm pretty much out of ideas. The logs don't show anything usable. I'm willing to provide them, though. Here is the buildspec.yml. I'm still convinced that there is something wrong in there...
version: 0.2
phases:
install:
commands:
- echo Entering install phase...
- wget http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
- tar xzvf apache-maven-3.3.9-bin.tar.gz -C /opt/
- export PATH=/opt/apache-maven-3.3.9/bin:$PATH
build:
commands:
- echo Entering BUILD phase...
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- 'jweb-web/target/*.war'