<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2010-2013 Orient Technologies LTD
  ~
  ~ 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.orientechnologies</groupId>
        <artifactId>orientdb-parent</artifactId>
        <version>2.2.2</version>
        <relativePath>../</relativePath>
    </parent>

    <name>OrientDB JDBC Driver</name>
    <artifactId>orientdb-jdbc</artifactId>


    <description>JDBC Driver for OrientDB NoSQL document graph dbms</description>
    <inceptionYear>2012</inceptionYear>

    <properties>
        <argLine>-XX:MaxDirectMemorySize=512g</argLine>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-test-commons</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-graphdb</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-client</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>${surefire.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/all.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <inherited>false</inherited>
                <configuration>
                    <header>${basedir}/LICENSE.txt</header>
                    <aggregate>true</aggregate>
                    <failIfMissing>true</failIfMissing>
                    <encoding>UTF-8</encoding>
                    <excludes>
                        <exclude>orientdb-jdbc.iml</exclude>
                        <exclude>README.textile</exclude>
                        <exclude>**/target/**</exclude>
                        <exclude>.idea/**</exclude>
                        <exclude>.classpath</exclude>
                        <exclude>.project</exclude>
                        <exclude>.settings/**</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>.gitattributes</exclude>
                        <exclude>src/test/**</exclude>
                    </excludes>
                    <strictCheck>true</strictCheck>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                                <configuration>
                                    <archive>
                                        <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                        </manifest>
                                        <manifestEntries>
                                            <Implementation-Build>${implementation.build}</Implementation-Build>
                                            <Implementation-Build-Date>${maven.build.timestamp}
                                            </Implementation-Build-Date>
                                            <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                                            <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                                        </manifestEntries>
                                    </archive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <quiet>true</quiet>
                                    <archive>
                                        <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                        </manifest>
                                        <manifestEntries>
                                            <Implementation-Build>${implementation.build}</Implementation-Build>
                                            <Implementation-Build-Date>${maven.build.timestamp}
                                            </Implementation-Build-Date>
                                            <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                                            <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                                        </manifestEntries>
                                    </archive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>

                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
