<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>sido-pom</artifactId>
		<groupId>net.sf.sido</groupId>
		<version>1.1.1</version>
	</parent>

	<artifactId>sido-gen-maven</artifactId>
	
    <packaging>maven-plugin</packaging>

	<name>SiDO Generation Maven Plug-in</name>
	<description>Maven plug-in to generate classes from SiDO schemas</description>

    <properties>
        <mavenPluginVersion>3.0.3</mavenPluginVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sido-gen</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenPluginVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mavenPluginVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-api</artifactId>
            <version>1.8</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-classworlds</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <!-- Default implementations -->
		<dependency>
		    <groupId>${project.groupId}</groupId>
		    <artifactId>sido-gen-model-pojo</artifactId>
		    <version>${project.version}</version>
		    <scope>runtime</scope>
		</dependency>
    </dependencies>

    <build>

        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>1.5</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <!-- Runs integration tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <debug>false</debug>
                            <showErrors>true</showErrors>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>
