<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">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.ovh.ws</groupId>
		<artifactId>jsonizer</artifactId>
		<version>2.0.0</version>
	</parent>

	<artifactId>jsonizer-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>

	<name>Jsonizer Maven Plugin</name>

	<properties>
		<maven-api.version>2.2.1</maven-api.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>jsonizer-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven-api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-project</artifactId>
			<version>${maven-api.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>integration-tests</id>
			<activation>
				<property>
					<name>maven.test.skip</name>
					<value>!true</value>
				</property>
			</activation>
			<build>
				<plugins>

					<plugin>
						<artifactId>maven-invoker-plugin</artifactId>
						<configuration>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<settingsFile>src/it/settings.xml</settingsFile>
							<preBuildHookScript>setup.groovy</preBuildHookScript>
							<postBuildHookScript>verify.groovy</postBuildHookScript>
							<showErrors>true</showErrors>
							<streamLogs>true</streamLogs>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>install</goal>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>
	</profiles>

</project>
