<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>jgws-game-server</artifactId>
    <name>${project.artifactId}</name>
        
    <parent>
        <artifactId>jgws</artifactId>
        <groupId>be.demmel.jgws</groupId>
        <version>0.1.0_RC1-SNAPSHOT</version>
    </parent>

    <description>The game server for JGWS</description>
    
    <properties>
		<junitGroups>!be.demmel.jgws.svc.jpa.inject.InjectTests</junitGroups>
	</properties>
    
    <dependencies>
        <dependency>
            <groupId>be.demmel.jgws</groupId>
            <artifactId>jgws-core</artifactId>
        </dependency>
        
        <dependency>
			<groupId>be.demmel.jgws</groupId>
			<artifactId>jgws-packets</artifactId>
		</dependency>
        
        <!-- TODO: common in the core! -->
		<dependency>
			<groupId>be.demmel.jgws</groupId>
			<artifactId>jgws-schema-bindings</artifactId>
			<version>${project.version}</version>
		</dependency>
    </dependencies>
    <build>
		<resources>
			<resource>
				<filtering>true</filtering>
				<directory>src/main/resources/</directory>
			</resource>
			<resource>
				<filtering>true</filtering>
				<directory>src/main/config/</directory>
				<targetPath>../config</targetPath>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<filtering>true</filtering>
				<directory>src/test/resources/</directory>
			</testResource>
		</testResources>
		<filters>
			<filter>src/main/filters/jpa-database-${bdd}.properties</filter>
		</filters>
        <plugins>
        	<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<!-- Run all but the inject tests -->
				<configuration>
					<groups>${junitGroups}</groups>
				</configuration>
			</plugin>
        	<!-- Allows Maven to launch this server -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<configuration>
					<mainClass>be.demmel.jgws.GameServer</mainClass>
					<systemProperties>
						 <systemProperty>
						 	<key>configurationFile</key>
						 	<value>target/config/gameServerConfiguration.xml</value>
						 </systemProperty>
						 <systemProperty>
						 	<key>logback.configurationFile</key>
						 	<value>target/config/logback.groovy</value>
						 </systemProperty>
					</systemProperties>
				</configuration>
			</plugin>
			
            <!-- TODO: release should happen in the parent POM -->
            <!-- TODO: try to declare the assembly plugin in the parent, while using the assembly file of the subprojects (game and login)-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/src.xml</descriptor>
                    </descriptors>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <repository>
            <id>repo</id>
            <name>repo</name>
            <url>file://tmp</url>
        </repository>
    </distributionManagement>

</project>
