Skip to content

robertdebock/ansible-role-eclipse

Install eclipse and plugins on your system.

GitHub GitLab Downloads Version
github gitlab downloads Version

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.eclipse
    # - role: robertdebock.eclipse
    #   eclipse_release: 2022-09
    #   eclipse_install_path: /opt/eclipse-{{ eclipse_release }}
    #   eclipse_link_paths:
    #     - /opt/eclipse-09
    #     - /opt/eclipse-202209
    # - role: robertdebock.eclipse
    #   eclipse_release: 2022-12
    #   eclipse_install_path: /opt/eclipse-{{ eclipse_release }}
    #   eclipse_link_paths: []

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.core_dependencies
    - role: robertdebock.java

Also see a full explanation and example on how to use these roles.

The default values for the variables are set in defaults/main.yml:

---
# defaults file for eclipse

# The release to install.
# See https://www.eclipse.org/downloads/packages/release
eclipse_release: 2023-06

# The release version to install, either: R, RC1, M3, M2 or M1.
eclipse_release_version: R

# The type of installation, either: jee, committers, cpp, dsl, java, javascript, jee, modeling, parallel, php, rcp, rust, scout or testing.
eclipse_release_type: java

# Where to download eclipse to. The installation will later be moved to a versioned path.
eclipse_tmp_path: /tmp

# The path where to install eclipse.
eclipse_install_path: /opt/eclipse-{{ eclipse_release }}

# The mirror to use for downloading eclipse.
# The mirrors keep the 3 last versions.
# eclipse_archive_mirror: "https://ftp.fau.de/eclipse/technology/epp/downloads/release"
# eclipse_archive_mirror: "https://download.eclipse.org/technology/epp/downloads/release"
eclipse_archive_mirror: "http://ftp.snt.utwente.nl/pub/software/eclipse/technology/epp/downloads/release"

# What path(s) would you like to link to the eclipse installation?
eclipse_link_paths:
  - /opt/eclipse

eclipse_plugins: []
# This plugin causes an issue:
# org.eclipse.m2e.logback.configuration:
# The org.eclipse.m2e.logback.configuration bundle was activated before
# the state location was initialized.  Will retry after the state location
# is initialized.
# - name: org.tigris.subversion.subclipse.feature.group
#   repository: "http://subclipse.tigris.org/update_1.10.x"
# - name: org.sonatype.m2e.egit.feature.feature.group
#   repository: "https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-egit/0.15.1/N/0.15.1.201806191431"

# You can have this role install Lombok into Eclipse.
eclipse_install_lombok: true
# Also specify the version of lombok.
eclipse_lombok_version: "1.18.22"

# You may install Maven.
eclipse_install_maven: true

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.core_dependencies Build Status GitHub Build Status GitLab
robertdebock.java Build Status GitHub Build Status GitLab

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

This role has been tested on these container images:

container tags
Amazon Candidate
EL 9
Debian all
Fedora all
Ubuntu all

The minimum version of Ansible required is 2.12, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub.

Apache-2.0.

robertdebock

Please consider sponsoring me.