- name: "accept the oracle license"
  debconf:
    name="oracle-java8-installer"
    question="shared/accepted-oracle-license-v1-1"
    value="true"
    vtype="select"

- name: "set up apt-keys"
  apt_key:
    id="EEA14886"
    keyserver="keyserver.ubuntu.com"
    state="present"

- name: "set up oracle java repo"
  apt_repository:
    repo="deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
    state="present"
    update_cache="yes"
    mode="0644"

- name: "install oracle's java8"
  apt:
    name="oracle-java8-installer"
    update_cache="yes"
    cache_valid_time="7200"
    state="present"

- name: "accept the oracle license"
  debconf:
    name="oracle-java8-installer"
    question="shared/accepted-oracle-license-v1-1"
    value="true"
    vtype="select"

- name: "set up apt-keys"
  apt_key:
    id="EEA14886"
    keyserver="keyserver.ubuntu.com"
    state="present"

- name: "set up oracle java repo"
  apt_repository:
    repo="deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
    state="present"
    update_cache="yes"
    mode="0644"

- name: "install oracle's java8"
  apt:
    name="oracle-java8-installer"
    update_cache="yes"
    cache_valid_time="7200"
    state="present"

- name: "install maven"
  apt:
    name="maven"
    update_cache="yes"
    cache_valid_time="7200"
    state="present"

Add maven 3.x to java target
Add maven 3.x to java target
