Здравствуйте, у меня не получается собрать Maven проект с использованием hibernate
вот мой pom.xml : там всего 2 депенденси добавлял еще сторонние в надежде что это поможет, но нет
<?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>firstCRUDapp</groupId>
<artifactId>firstCRUDapp</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.5.jre7</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.18.Final</version>
</dependency>
</dependencies>
</project>
вот мой hibernate.cfg.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/postgres</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.password">postgres</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</property>
<property name="hibernate.show_sql">true</property>
</session-factory>
</hibernate-configuration>
вот построение конфига
public class HibernateSessionFactoryUtil {
private static SessionFactory sessionFactory;
private HibernateSessionFactoryUtil() {}
public static SessionFactory getSessionFactory() {
if(sessionFactory == null) {
try {
Configuration configuration = new Configuration().configure(); //ошибка здесь
configuration.addAnnotatedClass(User.class);
configuration.addAnnotatedClass(Auto.class);
//???????
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties());
sessionFactory = configuration.buildSessionFactory(builder.build());
}catch (Exception ex){
ex.printStackTrace();
}
}
return sessionFactory;
}
}
вот структура проекта :

ошибка :

сам коннект через идею проверил :

читал что вроде можно указать путь к cfg.xml через idea но у меня настройки проекта выглядят так и способа там где то указать путь я не увидел :

//

//

не могу понять в чем проблема, вроде все выполнено по инструкции, заранее спасибо