pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>MathenoHibernate</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <exec.mainClass>com.mycompany.mathenohibernate.MathenoHibernate</exec.mainClass>
    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-core -->
        <dependency>
            <groupId>org.hibernate.orm</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>6.2.7.Final</version>
        </dependency>
         <!--https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc--> 
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.42.0.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-community-dialects -->
        <dependency>
            <groupId>org.hibernate.orm</groupId>
            <artifactId>hibernate-community-dialects</artifactId>
            <version>6.2.7.Final</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-dialects -->
        <dependency>
            <groupId>org.hibernate.orm</groupId>
            <artifactId>hibernate-dialects</artifactId>
            <version>6.2.7.Final</version>
        </dependency>
    </dependencies>
</project>

cd /home/user/NetBeansProjects/MathenoHibernate; JAVA_HOME=/app/jdk /app/netbeans/java/maven/bin/mvn clean install
Scanning for projects...

-------------------< com.mycompany:MathenoHibernate >-------------------
Building MathenoHibernate 1.0-SNAPSHOT
  from pom.xml
--------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/hibernate-dialects/6.2.7.Final/hibernate-dialects-6.2.7.Final.pom
The POM for org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/hibernate-dialects/6.2.7.Final/hibernate-dialects-6.2.7.Final.jar
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time:  1.348 s
Finished at: 2023-08-26T01:01:11-04:00
------------------------------------------------------------------------
Failed to execute goal on project MathenoHibernate: Could not resolve dependencies for project com.mycompany:MathenoHibernate:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final (absent): Could not find artifact org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final in central (https://repo.maven.apache.org/maven2) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException


ClientCode.java:
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 */

package com.mycompany.mathenohibernate;

import org.hibernate.Session;

public class ClientCode {
    public static void main(String[] args) {
        System.out.println("Hello World!");
        try {
            Session session = HibernateUtil.getSessionFactory().openSession();
            Object result = session.createNativeQuery("select version()").getSingleResult();
            System.out.println("MY DATABASE VERSION IS::::\n"+result);
        } catch (Exception e) {
            //
        }
    }
}


HibernateUtil.java:
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.mycompany.mathenohibernate;


import org.hibernate.SessionFactory;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
    private static SessionFactory sessionFactory;
    
    static {
        try {   
            if(sessionFactory == null) {
                Configuration cfg = new Configuration().configure();
                StandardServiceRegistry ssRegistry = new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();
                sessionFactory = cfg.buildSessionFactory(ssRegistry);
            }
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
    
    public static SessionFactory getSessionFactory() {
        return sessionFactory;
    }
}