<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~  Copyright 1999-2018 Alibaba Group Holding 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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>fescar-all</artifactId>
        <groupId>com.alibaba.fescar</groupId>
        <version>0.2.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>fescar-server</artifactId>
    <packaging>jar</packaging>
    <name>fescar-server ${project.version}</name>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>fescar-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <version>1.10</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <configurationDirectory>conf</configurationDirectory>
                    <configurationSourceDirectory>src/main/resources</configurationSourceDirectory>
                    <copyConfigurationDirectory>true</copyConfigurationDirectory>
                    <includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
                    <repositoryLayout>flat</repositoryLayout>
                    <repositoryName>lib</repositoryName>
                    <binFileExtensions>
                        <unix>.sh</unix>
                    </binFileExtensions>
                    <assembleDirectory>../distribution</assembleDirectory>
                    <programs>
                        <program>
                            <mainClass>com.alibaba.fescar.server.Server</mainClass>
                            <name>fescar-server</name>
                            <jvmSettings>
                                <extraArguments>
                                    <extraArgument>-server</extraArgument>
                                    <extraArgument>-XX:MaxDirectMemorySize=1024M</extraArgument>
                                </extraArguments>
                            </jvmSettings>
                        </program>
                    </programs>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
