WildFly Elytron

Setting up WildFly Elytron on macOS

This page will guide you through the steps needed to setup a development environment for WildFly Elytron on macOS.

Installing Java

  1. First, let’s check if you already have Java installed.

    1. Open a terminal and run java --version.

    2. If the output shows a version number, check to make sure it is Java 11 (e.g., "11.0.15.1"). If so, Java 11 is already installed and you can jump to the Installing Maven section. If the output is not Java 11, or if the output is command not found: java or a similar message indicating you do not have Java installed, then continue with the following steps.

  2. It is easiest to install Java using the Homebrew package manager. (If you’d prefer to install Java manually, check out this guide.)

    1. If you don’t already have brew installed, run the following command:

      /bin/zsh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. If you run brew -v and you get an error, you need to add Homebrew to your path. The output of the Homebrew installation will give you the commands needed to add to your path.

  3. Install Java: brew install java11

  4. Now run the following command to check if the Java installation was successful:

    brew search java
    1. Look for java11 listed under the Formulae section with a green checkmark next to it.

  5. Next we need to create a symbolic link so the system java wrappers can find it and add the path to JAVA_HOME to the environment variables. To do that, first run the following command:

    brew info java11
    1. The output will be something like this:

      For the system Java wrappers to find this JDK, symlink it with
      sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
      openjdk@11 is keg-only, which means it was not symlinked into /usr/local,
      because this is an alternate version of another formula.
      If you need to have openjdk@11 first in your PATH, run:
      echo ‘export PATH=”/usr/local/opt/openjdk@11/bin:$PATH”’ >> ~/.zshrc
    2. Follow the instructions from the output you receive to create the symbolic link and add the path to the environment variables.

    3. Lastly, run source <config file>, substituting in your config file, to load the changes into the terminal.

  6. Now run java --version again. You should now successfully see the Java 11 version that was installed.

Installing Maven

  1. First, let’s check if you already have Maven installed.

    1. Open a terminal, and run mvn -v.

    2. If the output shows a version number, Maven is already installed and you can jump to the Installing Git section. If you get command not found: mvn or a similar message indicating you do not have maven installed, then continue with the following steps.

  2. It is easiest to install Maven using the Homebrew package manager. (If you’d prefer to install Maven manually, check out this guide. Also consider a temporary configuration.)

    brew install maven
  3. Now run mvn -v again. You should now successfully see the Maven version that was installed.

Installing Git

  1. First, let’s check if you already have Git installed.

    1. Open a terminal and run git --version.

    2. If the output shows a version number, Git is already installed and you can jump to the Cloning WildFly Elytron section. If you get command not found: git or a similar message indicating you do not have Git installed, then continue with the following steps.

  2. It is easiest to install git using the Homebrew package manager. (If you’d prefer to install using a different approach, there are some more options here.)

    brew install git
  3. Now run git --version again. You should now successfully see the Git version that was installed.

  4. If you already had any IDEs open, close and reopen them now to load your changes.

Cloning WildFly Elytron

  1. First, configure Git so that it can attribute your commits to you. Run the following commands in the terminal, substituting your own name and email:

    git config --global user.email "<you@example.com>"
    git config --global user.name "<Your Name>"
  2. Next, you’ll need a GitHub account. If you don’t already have one, sign up for one at github.com. Otherwise, make sure you’re logged in.

  3. Fork the WildFly Elytron project into your GitHub account by clicking on the "Fork" button at the top right.

    Screenshot of buttons at top of wildfly-elytron repo, including "Fork" button

  4. Now go to your fork of the repository, the URL will be https://github.com//wildfly-elytron. Replace <USERNAME> with your GitHub username.

  5. At this point, you can follow the GitHub guide for adding a new SSH key to your GitHub account to set up an SSH key so you can clone your repository.

  6. At the top right, you will see there is a green "Code" button. Click on that and choose the "SSH" tab. Click on the button next to the url to copy it.

    Screenshot of options under "Code" button, under HTTPS tab.Default URL is https://github.com//wildfly-elytron.git
  7. Open your terminal and navigate to the directory where you want to clone this project. Then enter git clone [URL] and replace [URL] with the URL you copied in step 6. Now you should see a directory called wildfly-elytron that contains the code for the WildFly Elytron project.

  8. Next, add a remote reference to upstream, for pulling future updates from the source repository. Execute the following command in the terminal:

    cd wildfly-elytron
    git remote add upstream https://github.com/wildfly-security/wildfly-elytron.git

Building WildFly Elytron

  1. Open a terminal.

  2. Navigate to the wildfly-elytron project directory and run mvn clean install. This will build the project.

  3. Check out the Getting Started for Developers guide to learn more about the WildFly Elytron project and how to run tests.

Restoring Configuration

If you need to restore your original system configuration at some point, you can follow the steps here.