# Basic Setup

# Download JDK 11

  • Start by downloading the JDK 11 into the your preferred directory using the this link (opens new window)

  • open the terminal in your download folder and and change to your download folder

  • Extract the tar.gz file to /usr/java/ directory using the command:

    sudo tar xvzf jdk-11.0ee.7_linux-x64_bin.tar.gz -C /usr/java/
    

    Note: the version of the JDK as you will require this setting the environment varibles.

# Download Maven

Check on the latest maven version here here (opens new window)

  • Start by downloading the Apache Maven into the /tmp directory using the following wget command:

    wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
    
  • When the download is completed, extract the archive in the /opt directory:

    sudo tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt

  • To have more control over Maven versions and updates, we will create a symbolic link maven that will point to the Maven installation directory:

    sudo ln -s /opt/apache-maven-3.6.3 /opt/maven
    

    To upgrade your Maven installation, simply unpack the newer version and change the symlink to point to it.

# Setup environment variables

  • Next, we'll need to set up the environment variables.

    • Open your text editor and create a new file named mavenenv.sh inside of the /etc/profile.d/ directory.

      sudo nano /etc/profile.d/maven.sh
      
    • Paste the following lines:

      export JAVA_HOME=/usr/java/jdk-11.0.7/ export M2_HOME=/opt/maven export MAVEN_HOME=/opt/maven export PATH=${JAVA_HOME}/bin:${PATH} export PATH=${M2_HOME}/bin:${PATH}

    • Save and close the file. This script will be sourced at shell startup.

    • Make the script executable by running the following chmod command:

      sudo chmod +x /etc/profile.d/maven.sh
      
    • Load the environment variables using the source command:

      source /etc/profile.d/maven.sh
      

# Verify the installation

  • To verify that Maven is installed, use the mvn -version command which will print the Maven version:

    mvn -version
    

    To verify that Java is installed, use the java -version command which will print the java version:

    java -version
    
  • You should see something like the following:

    mvn version  image

# Getting Maven dependencies used in Xe

  • Download the maven zip from the link (opens new window). This will put it in the folder specified but its hidden so to list in the terminal use ls -a or navigate to the download folder(in linux) file explorer tap ctrl + H to show hidden files.

  • Open your terminal and backup the existing .m2 folder by renaming it to a different name using the command:

      mv ~/.m2/ ~/.m2backup
    

    This will move the existing .m2 folder into a new folder named by .m2backup

  • Next, switch to the downloaded maven location and extract it to the home folder using the command:

    unzip .m2.zip -d ~/
    

    The segment after the -d specifies, extract to the /home/username/ directory.

# Wildfly Configuration

You can setup wildfly as show below or get the already configured from here (opens new window)

  • Open wildfly-18.0. 0.Final/standalone/configuration/standalone.xml in the drivers section of datasources
    And within the <datasources></datasources> tag add datasource for oracle
    supplying username and password for the same

    <datasource jndi-name="java:jboss/datasources/XeDS" pool-name="XeDS" enabled="true" > <connection-url>jdbc:oracle:thin:@//host:port/service_name</connection-url> <driver>com.oracle</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>username</user-name> <password>password</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker" /> <check-valid-connection-sql>select 1</check-valid-connection-sql> <background-validation>true</background-validation> <background-validation-millis>15000</background-validation-millis> <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker" /> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter" /> </validation> <statement> <prepared-statement-cache-size>32</prepared-statement-cache-size> <share-prepared-statements>true</share-prepared-statements> </statement> </datasource>

  • Create user by running add-user.sh for administration in the bin directory.

Last Updated: 5/28/2025, 10:54:58 AM