<?xml version="1.0"?>
<!-- 
 Copyright 2011 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>../pom.xml</relativePath>
    </parent>
    <artifactId>japi-checker-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>JAPI-Checker Maven Plugin</name>
    <url>http://japi-checker.googlecode.com</url>
    
    <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>
    <distributionManagement>
        <repository>
            <id>sonatype-nexus</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mavenVersion>2.2.1</mavenVersion>
    </properties>
    
    <prerequisites>
        <maven>${mavenVersion}</maven>
    </prerequisites>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${mavenVersion}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
	        <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0</version>
        </dependency>        
        <dependency>
            <groupId>com.googlecode.japi-checker</groupId>
            <artifactId>japi-checker</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
        	<groupId>org.apache.maven.plugin-testing</groupId>
        	<artifactId>maven-plugin-testing-harness</artifactId>
        	<version>1.2</version>
        	<type>jar</type>
        	<scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
            <version>1.2</version>
        </dependency>
            <dependency>
            <groupId>com.googlecode.japi-checker</groupId>
            <artifactId>reference-test-jar</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.googlecode.japi-checker</groupId>
            <artifactId>new-test-jar</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <target>1.6</target>
                    <source>1.6</source>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.5.1</version>
                <executions>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <goalPrefix>japi-checker</goalPrefix>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <id>ensure-no-container-api</id>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.codehaus.plexus:plexus-component-api</exclude>
                                    </excludes>
                                    <message>The new containers are not
                                        supported. You probably added a
                                        dependency that is missing the
                                        exclusions.</message>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
 
</project>
