2023-03-02 13:51:45 -05:00
|
|
|
jobs:
|
|
|
|
- job: setup
|
2023-05-24 13:09:13 -04:00
|
|
|
displayName: Cache Maven Artifacts and Build Targets
|
2023-03-02 13:51:45 -05:00
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
fetchDepth: 1
|
|
|
|
- task: Cache@2
|
2023-05-24 13:09:13 -04:00
|
|
|
displayName: Cache maven artifacts
|
2023-03-02 13:51:45 -05:00
|
|
|
inputs:
|
2023-03-02 14:28:01 -05:00
|
|
|
key: maven | $(Build.BuildId) | artifacts
|
|
|
|
path: $(MAVEN_CACHE_FOLDER)
|
2023-05-24 13:09:13 -04:00
|
|
|
- template: cache-target-tasks-template.yml
|
2023-03-31 17:01:54 -04:00
|
|
|
parameters:
|
2023-05-24 13:09:13 -04:00
|
|
|
modules:
|
|
|
|
${{ parameters.modulesToCache }}
|
2023-03-02 13:51:45 -05:00
|
|
|
- task: Bash@3
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER)
|
2023-05-26 09:32:13 -04:00
|
|
|
- ${{ if eq(parameters.signArtifacts, true) }}:
|
|
|
|
- template: setup-signing-tasks-template.yml
|
2024-08-29 11:39:47 -04:00
|
|
|
- task: Maven@4
|
2023-03-02 13:51:45 -05:00
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
2023-05-26 09:32:13 -04:00
|
|
|
${{ if eq(parameters.signArtifacts, true) }}:
|
2024-10-07 11:01:08 -04:00
|
|
|
options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype -P CHECKSTYLE'
|
2023-05-26 09:32:13 -04:00
|
|
|
${{ else }}:
|
2024-10-07 11:01:08 -04:00
|
|
|
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -P CHECKSTYLE'
|
2024-11-08 16:42:26 -05:00
|
|
|
mavenOptions: '-Xmx1G'
|
2023-03-02 13:51:45 -05:00
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: '1.11'
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: false
|
2024-10-07 11:01:08 -04:00
|
|
|
goals: 'install'
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Report free disk space
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: df -H .
|