242 lines
9.3 KiB
XML
242 lines
9.3 KiB
XML
<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>org.jooq</groupId>
|
|
<artifactId>jooq-examples</artifactId>
|
|
<version>3.14.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>jooq-javaee-example</artifactId>
|
|
<packaging>war</packaging>
|
|
<name>jOOQ JavaEE Example</name>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>Apache License, Version 2.0</name>
|
|
<url>http://www.jooq.org/inc/LICENSE.txt</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<org.h2.version>1.4.199</org.h2.version>
|
|
<java.version>1.8</java.version>
|
|
|
|
<!-- JBoss dependency versions -->
|
|
<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
|
|
<version.jboss.bom>8.0.0.Final</version.jboss.bom>
|
|
|
|
<wildfly-port>10990</wildfly-port>
|
|
<wildfly-username>admin</wildfly-username>
|
|
<wildfly-password>admin</wildfly-password>
|
|
|
|
<!-- other plugin versions -->
|
|
<version.compiler.plugin>3.7.0</version.compiler.plugin>
|
|
<version.surefire.plugin>2.10</version.surefire.plugin>
|
|
<version.war.plugin>2.1.1</version.war.plugin>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<!-- Define the version of JBoss' Java EE 7 APIs we want to import.
|
|
Any dependencies from org.jboss.spec will have their version defined by this
|
|
BOM -->
|
|
<!-- JBoss distributes a complete set of Java EE 7 APIs including
|
|
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
|
|
a collection) of artifacts. We use this here so that we always get the correct
|
|
versions of artifacts. Here we use the jboss-javaee-7.0-with-tools stack
|
|
(you can read this as the JBoss stack of the Java EE 7 APIs, with some extras
|
|
tools for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate
|
|
stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras
|
|
from the Hibernate family of projects) -->
|
|
<dependency>
|
|
<groupId>org.wildfly.bom</groupId>
|
|
<artifactId>jboss-javaee-7.0-with-tools</artifactId>
|
|
<version>${version.jboss.bom}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<dependencies>
|
|
|
|
<!-- Database access -->
|
|
<dependency>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<version>${org.h2.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Wildfly and JavaEE -->
|
|
<dependency>
|
|
<groupId>javax.enterprise</groupId>
|
|
<artifactId>cdi-api</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jboss.spec.javax.annotation</groupId>
|
|
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jboss.spec.javax.faces</groupId>
|
|
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jboss.spec.javax.ejb</groupId>
|
|
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<!-- Logging -->
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
<version>2.11.0</version>
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<type>jar</type>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<finalName>${project.artifactId}</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-war-plugin</artifactId>
|
|
<version>${version.war.plugin}</version>
|
|
<configuration>
|
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>${version.compiler.plugin}</version>
|
|
<configuration>
|
|
|
|
|
|
|
|
|
|
<!-- IntelliJ needs these https://youtrack.jetbrains.com/issue/IDEA-195472 -->
|
|
<source>1.8</source>
|
|
<target>1.8</target>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- We're using the properties plugin to load external properties into Maven.
|
|
See this excellent blog post for an explanation:
|
|
http://www.petrikainulainen.net/programming/tips-and-tricks/creating-profile-specific-configuration-files-with-maven/ -->
|
|
<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>src/main/resources/config.properties</file>
|
|
</files>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- The H2 test schema is loaded here -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>sql-maven-plugin</artifactId>
|
|
<version>1.5</version>
|
|
|
|
<configuration>
|
|
<skip>${maven.test.skip}</skip>
|
|
<forkMode>always</forkMode>
|
|
</configuration>
|
|
|
|
<executions>
|
|
<execution>
|
|
<id>create-database-h2</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>execute</goal>
|
|
</goals>
|
|
<configuration>
|
|
<driver>${db.driver}</driver>
|
|
<url>${db.url}</url>
|
|
<username>${db.username}</username>
|
|
<password>${db.password}</password>
|
|
|
|
<autocommit>true</autocommit>
|
|
<srcFiles>
|
|
<srcFile>src/main/resources/db-h2.sql</srcFile>
|
|
</srcFiles>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<version>${org.h2.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
|
|
<!-- The jOOQ code generator plugin -->
|
|
<plugin>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-codegen-maven</artifactId>
|
|
<version>${project.version}</version>
|
|
|
|
<executions>
|
|
<execution>
|
|
<id>generate-h2</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<jdbc>
|
|
<driver>${db.driver}</driver>
|
|
<url>${db.url}</url>
|
|
<user>${db.username}</user>
|
|
<password>${db.password}</password>
|
|
</jdbc>
|
|
<generator>
|
|
<database>
|
|
<includes>.*</includes>
|
|
<excludes></excludes>
|
|
<inputSchema>PUBLIC</inputSchema>
|
|
</database>
|
|
<target>
|
|
<packageName>org.jooq.example.db.h2</packageName>
|
|
<directory>target/generated-sources/jooq-h2</directory>
|
|
</target>
|
|
</generator>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |