<?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-packet-generator</artifactId>
	<name>${project.artifactId}</name>

	<parent>
		<artifactId>jgws</artifactId>
		<groupId>be.demmel.jgws</groupId>
		<version>0.1.0_RC1-SNAPSHOT</version>
	</parent>

	<description>Generates the packets from an XML file which is dumped using another tool</description>

	<dependencies>
		<!-- Use the latest JAXB implementation -->
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.2.6</version>
		</dependency>

		<dependency>
			<groupId>com.sun.codemodel</groupId>
			<artifactId>codemodel</artifactId>
			<version>2.6</version>
		</dependency>
		
		<!-- So that Packet, Vector2 ... can be used during the generation -->
		<dependency>
			<groupId>be.demmel.jgws</groupId>
			<artifactId>jgws-core</artifactId>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<!-- Execute "mvn clean jaxb2:generate" to generate the JAXB 2 code -->
				<groupId>org.jvnet.jaxb2.maven2</groupId>
				<artifactId>maven-jaxb2-plugin</artifactId>
				<version>0.8.3</version>
				<executions>
					<execution>
						<!-- override the default binding to the generate-sources goal so that it only gets executed manually -->
						<phase>none</phase>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
					<execution>
						<id>default-cli</id>
						<!-- configuration that will be used when invoking a mojo directly into the CLI -->
						<configuration>
							<forceRegenerate>true</forceRegenerate>
							<schemaDirectory>src/main/xsd</schemaDirectory>
							<generateDirectory>src/main/java</generateDirectory>
							<generatePackage>be.demmel.jgws.packets.jaxb</generatePackage>
							<cleanPackageDirectories>true</cleanPackageDirectories>
							<!--episodeFile>src/main/resources/META-INF/sun-jaxb.episode</episodeFile -->
							<episode>false</episode>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- Allows Maven to launch this server (mvn clean package exec:java) -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<configuration>
					<mainClass>be.demmel.jgws.packets.generator.GeneratePackets</mainClass>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
