<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.github.pandafw</groupId>
		<artifactId>panda</artifactId>
		<version>1.6.0</version>
	</parent>

	<artifactId>panda-gems-users</artifactId>
	<packaging>jar</packaging>

	<name>Panda Gems Users</name>
	<description>Users login/logout extension module for the Panda Framework web application.</description>

	<build>
		<resources>
			<resource>
				<directory>${project.basedir}/src/main/resources</directory>
			</resource>
			<resource>
				<directory>${project.basedir}/src/main/templates</directory>
			</resource>
			<resource>
				<directory>${project.basedir}/src/gen/resources</directory>
			</resource>
			<resource>
				<directory>${project.basedir}/src/gen/templates</directory>
			</resource>
		</resources>

		<plugins>
			<!-- add source folder (src/gen) -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.basedir}/src/gen/java</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- ant build -->
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>codegen</id>
						<configuration>
							<target>
								<ant antfile="../panda-gems/build.xml">
									<target name="gen-all" />
								</ant>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
					<execution>
						<id>build</id>
						<configuration>
							<target>
								<ant antfile="../panda-gems/build.xml">
									<target name="${ant.target}" />
								</ant>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- git commit id -->
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
				</configuration>
			</plugin>

			<!-- jar -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Version>${project.version}</Version>
							<Revision>${git.commit.id.abbrev}</Revision>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<!-- gpg sign -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Panda -->
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>panda-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>panda-gear</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>panda-gems</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>panda-cgen</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- Servlet -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>${servlet.api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
			<version>${servlet.jsp.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.websocket</groupId>
			<artifactId>javax.websocket-api</artifactId>
			<version>${websocket.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
</project>
