<?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> <parent> <groupId>de.rwth.e3d</groupId> <artifactId>energydata</artifactId> <version>0.1-SNAPSHOT</version> </parent> <artifactId>energydata-api</artifactId> <name>EnergyData API</name> <version>0.1-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.jooq</groupId> <artifactId>jooq</artifactId> <version>3.9.2</version> </dependency> <dependency> <groupId>org.jooq</groupId> <artifactId>jooq-meta</artifactId> <version>3.9.2</version> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.0.0.jre7</version> </dependency> <dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> <version>2.6.1</version> </dependency> <!-- Required for Hikari --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> <version>1.7.25</version> </dependency> </dependencies> <build> <plugins> <!-- Unit Tests --> <!-- default incl. are "**/Test*.java", "**/*Test.java", "**/*TestCase.java" --> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire.version}</version> <dependencies> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-surefire-provider</artifactId> <version>${junit.platform.version}</version> </dependency> </dependencies> </plugin> <!-- Reads database credentials from an external .properties file --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0.0</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>database.properties</file> </files> </configuration> </execution> </executions> </plugin> <!-- Database binding generation --> <!-- Run "mvn generate-sources" to regenerate DB bindings --> <plugin> <groupId>org.jooq</groupId> <artifactId>jooq-codegen-maven</artifactId> <version>3.9.2</version> <!-- The plugin should hook into the generate goal --> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.0.0.jre7</version> </dependency> </dependencies> <configuration> <!-- Database login. Specified in database.properties --> <jdbc> <driver>org.postgresql.Driver</driver> <url>${postgis.jdbcUrl}</url> <user>${postgis.username}</user> <password>${postgis.password}</password> </jdbc> <!-- Code generator configuration, specifying e.g. which tables to generate bindings for --> <generator> <database> <name>org.jooq.util.postgres.PostgresDatabase</name> <includes> building | building_energy | building_campus | campus | surface_geometry | sensor | time_series | time_series_irregular | measured_variable_class | unit_of_measure </includes> <excludes></excludes> <inputSchema>public</inputSchema> </database> <target> <packageName>de.rwth.e3d.energydata.db.gen</packageName> <directory>src/main/java-generated</directory> </target> </generator> </configuration> </plugin> <!-- Includes the generated database bindings in the generated sources --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/java-generated</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>