diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..399d5b66c --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,30 @@ +# 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: +- main + +#pool: +# vmImage: ubuntu-latest + +pool: SDT Pool + +steps: +- task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' +- task: SnykSecurityScan@1 + inputs: + serviceConnectionEndpoint: 'Snyk' + testType: 'app' + failOnIssues: true + monitorWhen: 'always' diff --git a/pom.xml b/pom.xml index c681c0458..498589f7f 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,22 @@ 4.11 test + + + + org.apache.logging.log4j + log4j + 2.17.0 + pom + + + + + org.springframework + spring-core + 3.0.3.RELEASE + + diff --git a/src/main/java/com/microsoft/demo/Demo.java b/src/main/java/com/microsoft/demo/Demo.java index 3ab319fe3..18fce83af 100644 --- a/src/main/java/com/microsoft/demo/Demo.java +++ b/src/main/java/com/microsoft/demo/Demo.java @@ -1,12 +1,21 @@ package com.microsoft.demo; +import org.springframework.core.enums.LabeledEnum; + public class Demo { + public void DoSomething(boolean flag){ + + + System.out.println(LabeledEnum.LABEL_ORDER); + //log.debug(); if(flag){ System.out.println("I am covered"); return; } + + System.out.println("I am not covered"); } } \ No newline at end of file diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index b670dd6ee..25d5f2c7e 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,5 +1,5 @@ -

Hello World!

+

Hello World !!!