<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2011 Everit Kft. (http://www.everit.biz)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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.everit.config</groupId>
    <artifactId>org.everit.config.oss</artifactId>
    <version>7.3.0</version>
  </parent>

  <groupId>org.everit.persistence</groupId>
  <artifactId>org.everit.persistence.lqmg</artifactId>
  <version>4.1.1</version>

  <packaging>jar</packaging>

  <name>Everit - Liquibase-QueryDSL Model Generator</name>
  <description>
    A generator that supports creating QueryDSL metamodel from Liquibase changelog files via an embedded H2
    database from the command line.
  </description>

  <properties>
    <projectpath>osgi-lqmg</projectpath>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/everit-org/${projectpath}.git</connection>
    <developerConnection>scm:git:https://github.com/everit-org/${projectpath}.git</developerConnection>
    <url>https://github.com/everit-org/${projectpath}</url>
  </scm>

  <url>http://everit.org</url>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/everit-org/${projectpath}/issues</url>
  </issueManagement>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Everit Team</name>
    </developer>
  </developers>

  <organization>
    <name>Everit Kft.</name>
    <url>http://www.everit.biz</url>
  </organization>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/generated/java/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>lib/</classpathPrefix>
              <mainClass>org.everit.persistence.lqmg.LQMG</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <inherited>false</inherited>
            <configuration>
              <descriptor>src/main/assembly/src.xml</descriptor>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/dist/lib</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.6.201602180812</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.28</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <!-- TODO remove LQMG check exlusions -->
          <excludes>org/everit/persistence/lqmg/internal/schema/xml/*,org/everit/persistence/lqmg/internal/liquibase/*</excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <!-- TODO remove LQMG check exlusions -->
          <excludeFilterFile>lqmg-findbugs-exclude-filter.xml</excludeFilterFile>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.querydsl</groupId>
      <artifactId>querydsl-sql-codegen</artifactId>
      <version>4.1.4</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.178</version>
    </dependency>
    <dependency>
      <groupId>org.everit.persistence</groupId>
      <artifactId>org.everit.persistence.liquibase.ext.osgi</artifactId>
      <version>1.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.util.bundles</groupId>
      <artifactId>felix-utils-1.2.0</artifactId>
      <version>1.0.0</version>
      <exclusions>
        <exclusion>
          <artifactId>org.apache.felix.utils</artifactId>
          <groupId>org.apache.felix</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>osgi</artifactId>
      <version>3.9.1-v20140110-1610</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.6</version>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>2.2.10-b140310.1920</version>
    </dependency>
  </dependencies>

</project>
