<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">
    <parent>
        <artifactId>parent</artifactId>
        <groupId>org.richfaces.cdk</groupId>
        <version>4.3.0.20121214-M3</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>maven-cdk-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    
    <dependencies>
        <!-- Compile dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>sisu-guice</artifactId>
                    <groupId>org.sonatype.sisu</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-archiver</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>file-management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-velocity</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>generator</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>sisu-guice</artifactId>
                    <groupId>org.sonatype.sisu</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.modello</groupId>
                <artifactId>modello-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <!-- Generate the xpp3 reader code -->
                            <goal>xpp3-reader</goal>
                            <!-- Generate the xpp3 writer code -->
                            <goal>xpp3-writer</goal>
                            <!-- Generate the Java sources for the model itself -->
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <version>1.0.0</version>
                    <models>
                        <model>src/main/mdo/resource-config.mdo</model>
                    </models>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>it</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <debug>true</debug>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <preBuildHookScript>setup</preBuildHookScript>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <goals>
                                <goal>compile</goal>
                                <goal>test</goal>
                            </goals>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <description>Maven plugin for JSF components code generation</description>
    <name>RichFaces CDK Generator Maven Plugin</name>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.sonatype.sisu</groupId>
                <artifactId>sisu-guice</artifactId>
                <version>3.1.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
