<?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>

    <name>Mule DevKit</name>
    <description>
        Maven plug-in for generating Mule components. Includes support for developing transformers, cloud connectors and
        a lot more.
    </description>
    <url>http://github.com/mulesoft/mule-devkit</url>
    <inceptionYear>2010</inceptionYear>
    <licenses>
        <license>
            <name>Apache License v2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>

    <groupId>org.mule.tools.devkit</groupId>
    <artifactId>mule-devkit</artifactId>
    <version>3.1</version>
    <packaging>pom</packaging>

    <properties>
        <mule.version>3.2.0</mule.version>
    </properties>

    <modules>
        <module>model</module>
        <module>core</module>
        <module>tools</module>
        <!-- <module>dynamic</module> -->
        <module>archetypes</module>
        <module>integration-tests</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com:mulesoft/mule-devkit.git
        </connection>
        <developerConnection>
            scm:git:git@github.com:mulesoft/mule-devkit.git
        </developerConnection>
        <url>http://github.com/mulesoft/mule-devkit</url>
    </scm>

    <build>
        <defaultGoal>install</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                        <encoding>ISO-8859-1</encoding>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.8.0</version>
                <configuration>
                    <header>LICENSE_HEADER</header>
                    <excludes>
                        <exclude>target/**</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.ftl</exclude>
                        <exclude>**/build-number.txt</exclude>
                        <exclude>**/*.ftl</exclude>
                        <exclude>**/org/mule/devkit/model/code/**</exclude>
                        <exclude>**/org/mule/devkit/doclet/**</exclude>
                        <exclude>**/assets/**</exclude>
                        <exclude>**/*.xsd</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.xml</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-alpha-4</version>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.0,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[1.6.0,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.5</version>
                <executions>
                    <execution>
                        <id>pmd</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rulesets>
                                <ruleset>${project.basedir}/pmd.xml</ruleset>
                            </rulesets>
                            <targetJdk>1.6</targetJdk>
                            <verbose>true</verbose>
                            <aggregate>true</aggregate>
                            <linkXRef>false</linkXRef>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>windows_profile</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <properties>
                <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
            </properties>
        </profile>
        <profile>
            <id>linux_profile</id>
            <activation>
                <os>
                    <name>linux</name>
                </os>
            </activation>
            <properties>
                <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
            </properties>
        </profile>
        <profile>
            <id>osx_profile</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <properties>
                <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
            </properties>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>jboss</id>
            <name>JBoss</name>
            <url>http://repository.jboss.com/</url>
        </repository>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases</name>
            <url>http://repository.mulesoft.org/releases/</url>
        </repository>
        <repository>
            <id>oss-sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

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