| # Maven |
| # Build your Java project and run tests with Apache Maven. |
| # Add steps that analyze code, save build artifacts, deploy, and more: |
| # https://docs.microsoft.com/azure/devops/pipelines/languages/java |
| |
| trigger: |
| branches: |
| include: |
| - "*" |
| |
| jobs: |
| - job: build |
| displayName: "Build" |
| |
| pool: |
| vmImage: ubuntu-16.04 |
| |
| variables: |
| JAVA_TOOL_OPTIONS: "-XX:+UseG1GC" # No aggressive opts in JDK 11 |
| |
| steps: |
| - task: Maven@3 |
| displayName: "Maven: Build" |
| |
| inputs: |
| mavenOptions: '-Xmx2048m' |
| mavenPomFile: "pom.xml" |
| |
| javaHomeOption: "JDKVersion" |
| jdkVersionOption: "1.11" |
| jdkArchitectureOption: "x64" |
| publishJUnitResults: true |
| testResultsFiles: '**/surefire-reports/TEST-*.xml' |
| |
| goals: "package source:jar javadoc:jar" |
| options: "--batch-mode" |
| |
| - task: PublishCodeCoverageResults@1 |
| displayName: "Publish Coverage Results" |
| |
| inputs: |
| codeCoverageTool: "jaCoCo" |
| summaryFileLocation: "$(System.DefaultWorkingDirectory)/target/site/jacoco/jacoco.xml" |
| reportDirectory: "$(System.DefaultWorkingDirectory)/target/site/jacoco" |
| additionalCodeCoverageFiles: "$(System.DefaultWorkingDirectory)/**/jacoco.exec" |
| failIfCoverageEmpty: false |
| |
| - task: PublishBuildArtifacts@1 |
| displayName: "Artifact: Glowstone" |
| |
| inputs: |
| artifactName: 'Glowstone' |
| pathtoPublish: 'target/glowstone.jar' |
| |
| - task: PublishBuildArtifacts@1 |
| displayName: "Artifact: JavaDoc JAR" |
| |
| inputs: |
| artifactName: 'JavaDoc JAR' |
| pathtoPublish: 'target/glowstone-javadoc.jar' |
| |
| - task: PublishBuildArtifacts@1 |
| displayName: "Artifact: Sources JAR" |
| |
| inputs: |
| artifactName: 'Sources JAR' |
| pathtoPublish: 'target/glowstone-sources.jar' |