<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.github.protobufel</groupId>
		<artifactId>protobufel-parent</artifactId>
		<version>0.6</version>
	</parent>
	<artifactId>resource-exec-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<name>Resource Friendly Maven Exec Plugin</name>
	<url>https://github.com/protobufel/protobuf-el/resource-exec-maven-plugin/</url>
	<description>Maven Exec Plugin allowing resource globs and regexes as its arguments</description>
	<dependencies>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sisu</groupId>
			<artifactId>org.eclipse.sisu.inject</artifactId>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.annotation</artifactId>
		</dependency>
		<!--     <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>file-management</artifactId>
      <version>1.2.1</version>
    </dependency>
 -->		<!-- <dependency> <groupId>org.eclipse.sisu</groupId> <artifactId>org.eclipse.sisu.inject.extender</artifactId> 
			<version>0.2.1</version> </dependency> -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
<!-- 			<dependency>
				<groupId>org.junit.contrib</groupId>
				<artifactId>junit-theories</artifactId>
				<scope>test</scope>
			</dependency>
 -->		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-integration</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<testResources>
			<testResource>
				<directory>${project.basedir}/src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<configuration>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.sisu</groupId>
				<artifactId>sisu-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-index</id>
						<goals>
							<goal>main-index</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>sisu-maven-plugin</artifactId> 
				<version>1.4</version> <executions> <execution> <id>generate-index</id> <goals> 
				<goal>main-index</goal> </goals> </execution> </executions> </plugin> -->
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>linux-test-exec</id>
			<activation>
				<os>
					<family>unix</family>
				</os>
			</activation>
			<properties>
				<plugin.test.exec>rm</plugin.test.exec>
				<plugin.test.exec.system.command>true</plugin.test.exec.system.command>
			</properties>
		</profile>
		<profile>
			<id>windows-test-exec</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
			</activation>
			<properties>
        <plugin.test.exec>del</plugin.test.exec>
        <plugin.test.exec.system.command>true</plugin.test.exec.system.command>
			</properties>
		</profile>
		<profile>
			<id>run-its</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<configuration>
							<debug>true</debug>
							<projectsDirectory>src/it</projectsDirectory>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<pomIncludes>
								<pomInclude>*/pom.xml</pomInclude>
							</pomIncludes>
							<postBuildHookScript>verify</postBuildHookScript>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<settingsFile>src/it/settings.xml</settingsFile>
							<!-- <mergeUserSettings>true</mergeUserSettings> -->
							<properties>
								<plugin.test.exec>${plugin.test.exec}</plugin.test.exec>
<!-- 								<com.google.protobuf.protoc.path>${com.google.protobuf.protoc.path}</com.google.protobuf.protoc.path> -->
							</properties>
							<goals>
								<goal>clean</goal>
								<goal>test</goal>
<!-- 								<goal>package</goal> -->
							</goals>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<phase>verify</phase>
								<goals>
									<goal>install</goal>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
					</plugin>	
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
