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
|
2023-03-02 13:51:45 -05:00
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
2023-05-26 09:32:13 -04:00
|
|
|
${{ if eq(parameters.signArtifacts, true) }}:
|
|
|
|
options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype'
|
|
|
|
${{ else }}:
|
|
|
|
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests'
|
2023-03-02 13:51:45 -05:00
|
|
|
mavenOptions: '-Xmx3072m'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: '1.11'
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: false
|
2023-05-24 13:09:13 -04:00
|
|
|
goals: 'install'
|