<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.0.0.Final</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.richfaces.cdk</groupId>
	<artifactId>maven-cdk-plugin</artifactId>
	<version>4.0.0.Final</version>
	<packaging>maven-plugin</packaging>
	<name>Maven plugin for JSF components code generation</name>
	<dependencies>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-project</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>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.richfaces.cdk</groupId>
			<artifactId>generator</artifactId>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<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>
	
</project>