Skip to content

Commit

Permalink
Update client.yml file to build java repo
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard committed Nov 29, 2018
1 parent d943798 commit 8e4aba9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/client.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
jobs:
- job: ${{ format('Test_{0}', parameters.name) }}
dependsOn:
- 'Publish'
- 'Build'
pool:
vmImage: ${{ parameters.vmImage }}

Expand All @@ -17,7 +17,7 @@ jobs:
- task: Maven@3
displayName: 'Run tests'
inputs:
mavenPomFile: 'pom.client.build.xml'
mavenPomFile: $(pomFile)
options: '--batch-mode' #hides dependencies download progress from CI output
mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
javaHomeOption: 'JDKVersion'
Expand Down
47 changes: 11 additions & 36 deletions .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,29 @@ trigger:
- master

jobs:
- job: 'Publish'
- job: 'Build'

pool:
vmImage: 'ubuntu-16.04'

steps:
- task: Maven@3
displayName: 'Checkstyle'
displayName: 'Build and Package'
inputs:
mavenPomFile: 'pom.client.build.xml'
goals: 'checkstyle:check'
options: '--batch-mode'
mavenOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
publishJUnitResults: false
- task: Maven@3
inputs:
mavenPomFile: 'pom.client.build.xml'
options: '--batch-mode' #hides dependencies download progress from CI output
mavenOptions: '-Xmx3072m -Dmaven.test.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
mavenPomFile: $(pomFile)
goals: 'checkstyle:check javadoc:jar source:jar package'
options: '--batch-mode -Dmaven.test.skip=true'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'package'
displayName: 'Package'

- task: Maven@3
displayName: 'Javadoc'
inputs:
mavenPomFile: 'pom.client.build.xml'
goals: 'javadoc:jar'
options: '-DskipTests=true'
publishJUnitResults: false

- task: Maven@3
displayName: 'Sources'
inputs:
mavenPomFile: 'pom.client.build.xml'
goals: 'source:jar'
options: '-DskipTests=true'
publishJUnitResults: false

- task: CopyFiles@2
inputs:
contents: '**/*.jar'
targetFolder: $(Build.ArtifactStagingDirectory)
flattenFolders: true
displayName: 'Copy'
- powershell: |
# use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
# in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
displayName: 'Copy JAR and POM files to artifact staging'
- task: PublishBuildArtifacts@1
displayName: 'Publish'
Expand Down

0 comments on commit 8e4aba9

Please sign in to comment.