version: 2.1

commands:
  create_custom_cache_lock:
    description: "Create custom cache lock for java version."
    parameters:
      filename:
        type: string
    steps:
      - run:
          name: Grab java version and dump to file
          command: java -version > << parameters.filename >>

default_steps: &default_steps
  steps:
    - checkout

    - run: |
        mvn clean install -Dgpg.skip $MVN_EXTRA_OPTS

jobs:
  openjdk7:
    docker:
      - image: jfullaondo/openjdk:7
    environment:
      MVN_EXTRA_OPTS: -Dcheckstyle.version=2.15 -Dcheckstyle.skip
    <<: *default_steps
  openjdk8:
    docker:
      - image: circleci/openjdk:8u242
    <<: *default_steps
  openjdk9:
    docker:
      - image: circleci/openjdk:9.0.4-12
    <<: *default_steps
  openjdk11:
    docker:
      - image: circleci/openjdk:11.0.2
    <<: *default_steps
  openjdk13:
    docker:
      - image: circleci/openjdk:13.0.2-buster
    <<: *default_steps
  openjdk14:
    docker:
      - image: circleci/openjdk:14.0.2-buster
    <<: *default_steps

workflows:
  version: 2
  agent-tests:
    jobs:
      - openjdk7
      - openjdk8
      - openjdk9
      - openjdk11
      - openjdk13

version: 2.1

commands:
  create_custom_cache_lock:
    description: "Create custom cache lock for java version."
    parameters:
      filename:
        type: string
    steps:
      - run:
          name: Grab java version and dump to file
          command: java -version > << parameters.filename >>

default_steps: &default_steps
  steps:
    - checkout

    - run: |
        mvn clean install $MVN_EXTRA_OPTS

jobs:
  openjdk7:
    docker:
      - image: jfullaondo/openjdk:7
    environment:
      MVN_EXTRA_OPTS: -Dcheckstyle.version=2.15 -Dcheckstyle.skip
    <<: *default_steps
  openjdk8:
    docker:
      - image: circleci/openjdk:8u242
    <<: *default_steps
  openjdk9:
    docker:
      - image: circleci/openjdk:9.0.4-12
    <<: *default_steps
  openjdk11:
    docker:
      - image: circleci/openjdk:11.0.2
    <<: *default_steps
  openjdk13:
    docker:
      - image: circleci/openjdk:13.0.2-buster
    <<: *default_steps
  openjdk14:
    docker:
      - image: circleci/openjdk:14.0.2-buster
    <<: *default_steps

workflows:
  version: 2
  agent-tests:
    jobs:
      - openjdk7
      - openjdk8
      - openjdk9
      - openjdk11
      - openjdk13

Remove need for CircleCI to skip gpg plugin
[build] Remove need for CircleCI to skip gpg plugin

We use profiles for this now so there's no need to manually skip things
during tests.
