title: How to configure intellij idea to use hibernate persistence tools and reading mapping files from external jar files
body: <p>Assume that i have this below <code>hibernate.cfg.xml</code> file that contains data source configuration and path to jar files that contains <code>.hbm.xml</code> mappings:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.OracleDriver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@192.168.251.134:1521:DB&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;rgh&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;rgh&lt;/property&gt;
          &lt;property name="hibernate.connection.pool_size"&gt;10&lt;/property&gt;
          &lt;property name="show_sql"&gt;true&lt;/property&gt;
          &lt;property name="hibernate.connection.internal_logon"&gt;normal&lt;/property&gt;
          &lt;property name="dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
          &lt;property name="hibernate.hbm2ddl.auto"&gt;none&lt;/property&gt;
          &lt;property name="hibernate.default_schema"&gt;rgh&lt;/property&gt;
          &lt;property name="hibernate.connection.datasource"&gt;jndi&lt;/property&gt;
          &lt;!-- Mapping files --&gt;
  
          &lt;mapping jar="C:\Users\Ghafari\.m2\repository\org\rgh\goodsCirculation\1.0-releases\goods-1.0-releases.jar"&gt;&lt;/mapping&gt;
          &lt;mapping jar="C:\Users\Ghafari\.m2\repository\org\rgh\core\1.0-releases\core-1.0-releases.jar"&gt;&lt;/mapping&gt;
          &lt;mapping jar="C:\Users\Ghafari\.m2\repository\org\rgh\framework\2.1.1-releases\framework-2.1.1-releases.jar"&gt;&lt;/mapping&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>How should i configure intellij idea to use hibernate console and write hql queries?
  Each jar file only contains <code>.hbm.xml</code> files</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I can not put each mapping like <code>&lt;mapping resource="org/rgh/hibernate/Category.hbm.xml"/&gt;</code>, because i have over 1,500 <code>.hbm.xml</code> file.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I recently migrated from Eclipse to Intellij Idea, in Eclipse hql editor tools works properly with this hibernate.cfg.xml file, but Intellij Idea doesn't work.</p>