After I tried unsuccessfully to add ehcache dependencies manually in a hibernate project using IntelliJ Idea , I decided to use maven and I added maven framework support to the project.Now I have an existing pom.xml file and I want to add the pom (with its dependencies) from this location (http://repo1.maven.org/maven2/org/hibernate/hibernate-ehcache/4.1.9.Final/). How do I do that? Can I have more than one pom.xml file in a project? Thank you.
Here is the current pom.xml file I am using :
<?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>groupId</groupId> <artifactId>HibernateProject1</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.1.9.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-ehcache</artifactId> <version>4.1.9.Final</version> </dependency> </dependencies> </project> Now I am getting the following error :
Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml not found