<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">

	<parent>
		<groupId>net.anotheria</groupId>
		<artifactId>moskito</artifactId>
		<version>2.2.6</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>moskito-central</artifactId>
	<version>2.2.6</version>
	<name>moskito central snapshot storage</name>

	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>ano-util</artifactId>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>ano-prise</artifactId>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>ano-net</artifactId>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>moskito-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>moskito-sql</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>moskito-web</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>configureme</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-server</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-servlet</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-json</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.jersey.jersey-test-framework</groupId>
			<artifactId>jersey-test-framework-grizzly2</artifactId>
			<version>1.17.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
		</dependency>

		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>distributeme-core</artifactId>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>distributeme-support</artifactId>
		</dependency>
		<dependency>
			<groupId>net.anotheria</groupId>
			<artifactId>distributeme-agents</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.0-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
		</dependency>

		<dependency>
			<groupId>postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
		</dependency>
		<!-- <dependency> <groupId>com.owlike</groupId> <artifactId>genson</artifactId> 
			<version>0.94</version> </dependency> -->
	</dependencies>

	<build>
		<plugins>

			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<configuration>
					<filesets>
						<fileset>
							<directory>${basedir}/generated</directory>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>apt-maven-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>org.jfrog.maven.annomojo</groupId>
						<artifactId>maven-plugin-tools-anno</artifactId>
						<version>1.3.1</version>
						<exclusions>
							<exclusion>
								<groupId>com.sun</groupId>
								<artifactId>tools</artifactId>
							</exclusion>
						</exclusions>
					</dependency>
					<dependency>
						<groupId>net.anotheria</groupId>
						<artifactId>distributeme-generator</artifactId>
						<version>${distributeme.version}</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>process</id>
						<goals>
							<goal>process</goal>
						</goals>
						<phase>generate-sources</phase>
						<configuration>
							<factory>org.distributeme.processors.GeneratorProcessorFactory</factory>
							<encoding>UTF-8</encoding>
							<verbose>true</verbose>
							<outputDirectory>${project.basedir}/generated/java</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
						</manifest>
					</archive>
					<webXml>etc/web.xml</webXml>
					<webResources>
						<resource>
							this is relative to the pom.xml directory
							<directory>java</directory>
							<includes>
								<include>**/*.jsp</include>
							</includes>
						</resource>
					</webResources>
				</configuration>
			</plugin>


		</plugins>
	</build>

	<profiles>
		<profile>
			<id>jar-with-service</id>
			<build>
				<plugins>

					<!-- build executable jar with main class -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<version>2.0</version>
						<configuration>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>shade</goal>
								</goals>
								<configuration>
									<transformers>
										<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
											<manifestEntries>
												<Main-Class>net.anotheria.moskito.central.endpoints.rmi.generated.RMIEndpointServer</Main-Class>
												<Build-Number>123</Build-Number>
											</manifestEntries>
										</transformer>
									</transformers>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

</project>