• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2@echo off
3
4@setlocal enableextensions enabledelayedexpansion
5
6pushd %~dp0\..\
7
8 :: install chocolatey
9"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
10:: this will also install jdk8
11choco install adoptopenjdk8 maven -y
12call RefreshEnv.cmd
13echo JAVA_HOME=%JAVA_HOME%
14
15cd %CODEBUILD_SRC_DIR%
16mvn -B compile -Pwindows-codebuild || goto error
17
18popd
19@endlocal
20goto :EOF
21
22:error
23popd
24@endlocal
25echo Failed with error #%errorlevel%.
26exit /b %errorlevel%
27