<!-- 
 Copyright 2013 William Bernardet
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
  -->
<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>
		<artifactId>japi-checker-pom</artifactId>
		<groupId>com.googlecode.japi-checker</groupId>
		<version>0.2.0</version>
		<relativePath>..</relativePath>
	</parent>
	<artifactId>japi-checker-ant</artifactId>
	<name>JAPI-Checker Ant task</name>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>william.bernardet</id>
            <email>william.bernardet@gmail.com</email>
            <timezone>+2</timezone>
            <name>William Bernardet</name>
        </developer>
    </developers>

	<dependencies>
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
			<version>1.7.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.googlecode.japi-checker</groupId>
			<artifactId>japi-checker</artifactId>
			<version>0.2.0</version>
		</dependency>
		<dependency>
			<groupId>com.googlecode.japi-checker</groupId>
			<artifactId>reference-test-jar</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.googlecode.japi-checker</groupId>
			<artifactId>new-test-jar</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>2.0.0</version>
			<scope>test</scope>
        </dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<archive>
					</archive>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
    				<execution>
      					<id>make-assembly</id> <!-- this is used for inheritance merges -->
      					<phase>package</phase> <!-- bind to the packaging phase -->
      					<goals>
        					<goal>single</goal>
      					</goals>
    				</execution>
  				</executions>
        	</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
        		<version>1.7</version>
        		<executions>
					<execution>
						<phase>integration-test</phase>
						<configuration>
							<target unless="skipTests">
								<echo>Running antunit test...</echo>
								<echoproperties />
								<echo>${com.googlecode.japi-checker:reference-test-jar:jar}</echo>
								<echo>${com.googlecode.japi-checker:new-test-jar:jar}</echo>
								<echo>${com.google.code.findbugs:annotations:jar}</echo>
								<property name="maven.project.version" value="${project.version}" />
								<ant antfile="src/test/ant/build.xml" target="test" inheritRefs="true" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-antunit</artifactId>
						<version>1.2</version>
					</dependency>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-launcher</artifactId>
						<version>1.8.2</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>

</project>