<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>
    <groupId>org.mule.tools</groupId>
    <artifactId>github-readme-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>1.0-SNAPSHOT</version>
    <url>http://github.com/mulesoft/github-readme-maven-plugin</url>

    <name>Github README Maven Plugin</name>
    <description>Generates a README.md out of a Maven Project</description>

    <properties>
        <maven.version>3.0.3</maven.version>
        <aether.version>1.12</aether.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:git:git://github.com:mulesoft/github-readme-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/github-readme-maven-plugin.git</developerConnection>
        <url>http://github.com/mulesoft/github-readme-maven-plugin</url>
    </scm>

    <developers>
        <developer>
            <name>Alberto Pose</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>CPAL v1.0</name>
        </license>
    </licenses>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.8.0</version>
                <configuration>
                    <header>LICENSE_HEADER.txt</header>
                    <excludes>
                        <exclude>target/**</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>.idea/**</exclude>
                        <exclude>**/*.groovy</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>**/*.txt</exclude>
                    </excludes>
                    <strictCheck>true</strictCheck>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Integration Tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <debug>true</debug>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <projectsDirectory>src/it</projectsDirectory>
                    <settingsFile>src/it/settings.xml</settingsFile>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--
            <plugin>
                <groupId>org.mule.tools</groupId>
                <artifactId>github-readme-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>generate-readme</id>
                        <phase>install</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <sections>
                                <section><![CDATA[
## Build

    mvn clean install

## Usage

Add the following plugin to your pom.xml in the build -> plugins section:
```xml
 <plugin>
    <groupId>org.mule.tools</groupId>
    <artifactId>github-readme-maven-plugin</artifactId>
    <version>@project.version@</version>
    <executions>
        <execution>
            <phase>install</phase>
            <goals>
                <goal>generate-readme</goal>
            </goals>
            <configuration>
                <sections>
                    <section><![CDATA[# This a new section that will be added to the README.md]]</section>
                </sections>
            </configuration>
        </execution>
    </executions>
  <plugin>
```

 So that will generate the README.md in the root folder of the project with the information that can be extracted from the following tags:

  * name
  * description
  * licenses
  * developers

among others.
]]></section>
                            </sections>
                        </configuration>
                    </execution> 
                </executions>
            </plugin>
            -->
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Repository</name>
            <url>https://repository.mulesoft.org/releases/</url>
        </repository>
        <snapshotRepository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>https://repository.mulesoft.org/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-verifier</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
