machine:
  java:
    version: oraclejdk8

dependencies:
  pre:
    - curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&source=github'
    - sudo dpkg -i cf-cli_amd64.deb
    - cf -v

test:
  override:
    - mvn -P test

  post:
    - cf api https://api.run.pivotal.io
    - cf auth $PWS_USER $PWS_PASSWORD
    - cf target -o $PWS_ORG -s $PWS_SPACE
    - cf a

deployment:
  production:
    branch: master
    commands:
      - cf push $PWS_APPNAME -p target/annotated-spring-0.0.1-SNAPSHOT.jar

machine:
  java:
    version: oraclejdk8

dependencies:
  pre:
    - curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&source=github'
    - sudo dpkg -i cf-cli_amd64.deb
    - cf -v

test:
  override:
    - mvn -P test
    - mvn package

  post:
    - cf api https://api.run.pivotal.io
    - cf auth $PWS_USER $PWS_PASSWORD
    - cf target -o $PWS_ORG -s $PWS_SPACE
    - cf a

deployment:
  production:
    branch: master
    commands:
      - cf push $PWS_APPNAME -p target/annotated-spring-0.0.1-SNAPSHOT.jar

Create JAR after running tests on CircleCI.
Create JAR after running tests on CircleCI.
