-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
executable file
·38 lines (35 loc) · 1.02 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: 0.1
environment_variables:
plaintext:
M3_PATH: "/opt/apache-maven-3.3.9/bin"
phases:
install:
commands:
- sudo cat ~/.m2/settings.xml
- sudo ls -l ~/.m2
- sudo rm -rf ~/.m2
- sudo wget http://www-us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
- sudo tar xzvf apache-maven-3.3.9-bin.tar.gz -C /opt/
# export is not a command error is coming - sudo export PATH=/opt/apache-maven-3.3.9/bin:$PATH
- sudo apt-get autoclean
- sudo apt-get update -y
#- sudo apt-get install -yf maven
- sudo java -version
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
- sudo which mvn
- echo which mvn
- sudo $M3_PATH/mvn -version
build:
commands:
- echo Build started on `date`
#- echo mvn version `mvn -version`
- sudo $M3_PATH/mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- target/demo-0.0.1.jar
discard-paths: yes