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

Streamlining project to archetype.

parent 02f570f6
No related branches found
No related tags found
No related merge requests found
<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>
<parent>
<groupId>de.hdm-stuttgart.mi</groupId>
<artifactId>lecturenotes-pom</artifactId>
<version>1.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>de.hdm-stuttgart.mi.sda1</groupId>
<artifactId>lecture-operations</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>Lecture-operations</name>
<url>http://www.mi.hdm-stuttgart.de/freedocs</url>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.0.CR1</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>5.0.0.CR1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.mysql-connector-java.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration/>
</plugin>
</plugins>
</build>
<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>
<parent>
<groupId>de.hdm-stuttgart.mi</groupId>
<artifactId>lecturenotes-pom</artifactId>
<version>1.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>de.hdm-stuttgart.mi.sda1</groupId>
<artifactId>lecture-operations</artifactId>
<version>0.9</version>
<packaging>jar</packaging>
<name>lecture-operations</name>
<url>http://www.mi.hdm-stuttgart.de/freedocs</url>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.1.0.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6</version>
</dependency>
<!-- Required for executable jar generation to avoid ClassNotFoundException:
com.fasterxml.jackson.core.type.TypeReference and similar dependency problems. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration />
</plugin>
</plugins>
</build>
</project>
......@@ -34,5 +34,6 @@ public class PersistDriver {
}
em.close();
emFactory.close();
}
}
......@@ -48,5 +48,6 @@ public class ReadAllLecturesCriteriaDriver {
}
em.close();
emFactory.close();
}
}
......@@ -41,5 +41,6 @@ public class ReadAllLecturesJpqlDriver {
}
em.close();
emFactory.close();
}
}
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="jpa-recreate" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<persistence
version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="jpa-recreate">
<!--
Hibernate will scan your classpath for mapped classes and add them automatically
to your persistence unit.
-->
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<!--
setting the previous option "exclude-unlisted-classes" to 'true' requires entity classes to
be listed explicitely. You may want to uncomment the following definition and add more classes.
<class>de.mi.hdm_stuttgart.Airline</class>
-->
<!--
Standard or vendor-specific options can be set as properties on a persistence unit.
Any standard properties have the <code>javax.persistence</code> name prefix, Hibernate's
settings use <code>hibernate</code>
-->
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/hdm" />
<property name="javax.persistence.jdbc.user" value="hdmuser" />
<property name="javax.persistence.jdbc.password" value="XYZ" />
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<!--
JDBC database connection parameter
-->
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name="javax.persistence.jdbc.user" value="hdmuser"/>
<property name="javax.persistence.jdbc.password" value="XYZ"/>
<!--
The JPA engine should drop and re-create the SQL schema in the database
automatically when it boots. This is ideal for automated testing, when
you want to work with a clean database for every test run.
-->
<property
name="javax.persistence.schema-generation.database.action"
value="drop-and-create"/>
<!--
When printing SQL in logs, let Hibernate format the SQL nicely and generate
comments into the SQL string so we know why Hibernate executed the SQL statement.
-->
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<!-- Choose Mysql's innodb backend -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<!-- Configuring Connection Pool -->
<property name="hibernate.c3p0.min_size" value="5" />
<property name="hibernate.c3p0.max_size" value="20" />
<property name="hibernate.c3p0.timeout" value="500" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.idle_test_period" value="2000" />
<!-- Enable Hibernate scanning for entity classes and adding them automatically
but not for hbm.xml files. -->
<property name="hibernate.archive.autodetection" value="class"/>
</properties>
</persistence-unit>
<persistence-unit name="jpa-update" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<persistence-unit name="jpa-update">
<!--
Hibernate will scan your classpath for mapped classes and add them automatically
to your persistence unit.
-->
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<!--
setting the previous option "exclude-unlisted-classes" to 'true' requires entity classes to
be listed explicitely. You may want to uncomment the following definition and add more classes.
<class>de.mi.hdm_stuttgart.Airline</class>
-->
<!--
Standard or vendor-specific options can be set as properties on a persistence unit.
Any standard properties have the <code>javax.persistence</code> name prefix, Hibernate's
settings use <code>hibernate</code>
-->
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/hdm" />
<property name="javax.persistence.jdbc.user" value="hdmuser" />
<property name="javax.persistence.jdbc.password" value="XYZ" />
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<!--
JDBC database connection parameter
-->
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name="javax.persistence.jdbc.user" value="hdmuser"/>
<property name="javax.persistence.jdbc.password" value="XYZ"/>
<!--
The JPA engine should drop and re-create the SQL schema in the database
automatically when it boots. This is ideal for automated testing, when
you want to work with a clean database for every test run.
-->
<property
name="javax.persistence.schema-generation.database.action"
value="update"/>
<!--
When printing SQL in logs, let Hibernate format the SQL nicely and generate
comments into the SQL string so we know why Hibernate executed the SQL statement.
-->
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<!-- Choose Mysql's innodb backend -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<!-- Configuring Connection Pool -->
<property name="hibernate.c3p0.min_size" value="5" />
<property name="hibernate.c3p0.max_size" value="20" />
<property name="hibernate.c3p0.timeout" value="500" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.idle_test_period" value="2000" />
<!-- Enable Hibernate scanning for entity classes and adding them automatically
but not for hbm.xml files. -->
<property name="hibernate.archive.autodetection" value="class"/>
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment