Skip to content
Snippets Groups Projects
Commit 573edfa4 authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

Generate JPA metamodel

parent 387ffcb0
Branches
No related merge requests found
...@@ -96,6 +96,15 @@ ...@@ -96,6 +96,15 @@
<artifactId>derbytools</artifactId> <artifactId>derbytools</artifactId>
<version>10.15.2.0</version> <version>10.15.2.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
...@@ -132,6 +141,27 @@ ...@@ -132,6 +141,27 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>target/generated-sources/annotations</outputDirectory>
<processors>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</processors>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -6,6 +6,7 @@ module koz01.java2.lab09 { ...@@ -6,6 +6,7 @@ module koz01.java2.lab09 {
requires java.sql; requires java.sql;
requires org.hibernate.orm.core; requires org.hibernate.orm.core;
requires java.compiler; requires java.compiler;
requires java.annotation;
opens koz01.java2.lab09 to org.hibernate.orm.core; opens koz01.java2.lab09 to org.hibernate.orm.core;
} }
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
xsi:schemaLocation=" xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="primary" transaction-type="RESOURCE_LOCAL"> <persistence-unit name="lab09" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<!-- HSQL --> <!-- HSQL -->
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment