Skip to content
Snippets Groups Projects
Commit b3965b11 authored by Goik Martin's avatar Goik Martin
Browse files

cleaning pom.xml from comments, hibernate specific --> JPA

parent 31636674
Branches
No related tags found
No related merge requests found
......@@ -249,22 +249,22 @@
<title>Adding Hibernate dependencies</title>
<para>Our goal is to start using Hibernate for a console based project.
Searching the Maven repository for hibernate-core provides a suitable
artifact:</para>
Searching the Maven repository for <code>hibernate-entitymanager</code>
provides a suitable artifact:</para>
<programlisting language="none">&lt;dependency&gt;
&lt;groupId&gt;org.hibernate&lt;/groupId&gt;
&lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
&lt;version&gt;4.1.9.Final&lt;/version&gt;
&lt;/dependency&gt; </programlisting>
&lt;groupId&gt;org.hibernate&lt;/groupId&gt;
&lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
&lt;version&gt;5.1.0.Final&lt;/version&gt;
&lt;/dependency&gt;</programlisting>
</section>
<section xml:id="sect_createHibernateConfiguration">
<title>Creating a Hibernate configuration</title>
<title>Creating a <xref linkend="glo_JPA"/> configuration</title>
<para>Hibernate is intended to provide persistence services saving
transient <xref linkend="glo_Java"/> instances to a database. For this
purpose Hibernate needs:</para>
<para><xref linkend="glo_JPA"/> is intended to provide persistence
services saving transient <xref linkend="glo_Java"/> instances to a
database. For this purpose we have to provide:</para>
<itemizedlist>
<listitem>
......@@ -308,10 +308,13 @@
</listitem>
</itemizedlist>
<para>Hibernate offers an XML based configuration syntax. We show a toy
example of a <filename>hibernate.cfg.xml</filename> configuration file
mapping just one class <classname>hibintro.v1.model.User</classname> to
a <xref linkend="glo_Soft_Mysql"/> database server:</para>
<para><xref linkend="glo_JPA"/> offers an XML based configuration syntax
typically residing in
<filename>src/main/resources/META-INF/persistence.xml</filename>. We
show a toy example of a <filename>hibernate.cfg.xml</filename>
configuration file mapping just one class
<classname>hibintro.v1.model.User</classname> to a <xref
linkend="glo_Soft_Mysql"/> database server:</para>
<figure xml:id="hibernateConfigurationFile">
<title>A basic Hibernate configuration file
......
......@@ -16,7 +16,6 @@
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
......@@ -29,45 +28,6 @@
<version>5.1.38</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>junit</groupId> -->
<!-- <artifactId>junit</artifactId> -->
<!-- <version>4.12</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>mysql</groupId> -->
<!-- <artifactId>mysql-connector-java</artifactId> -->
<!-- <version>5.1.22</version> -->
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.hibernate</groupId> -->
<!-- <artifactId>hibernate-core</artifactId> -->
<!-- <version>4.1.9.Final</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.jdom</groupId> -->
<!-- <artifactId>jdom</artifactId> -->
<!-- <version>2.0.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.testng</groupId> -->
<!-- <artifactId>testng</artifactId> -->
<!-- <version>6.8</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-api</artifactId> -->
<!-- <version>1.7.5</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-log4j12</artifactId> -->
<!-- <version>1.7.5</version> -->
<!-- </dependency> -->
</dependencies>
<build>
<plugins>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment