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

  <groupId>org.bsc.maven</groupId>
  <artifactId>maven-processor-plugin-test</artifactId>
  <version>3.3.2-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>MAVEN PROCESSOR PLUGIN TEST- ${project.version}</name>
  <description></description>

  <properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <!--
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    -->
  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <inceptionYear>2012</inceptionYear>


<build>

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>1.7</version>
        </plugin>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-toolchains-plugin</artifactId>
           <version>1.1</version>
        </plugin>
    </plugins>

</pluginManagement>
<plugins>

<!--
===================================================================
PROCESSOR PLUGIN
===================================================================
 -->

    <plugin>
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <version>${project.version}</version>
        <dependencies>
            <dependency>
                <groupId>org.bsc</groupId>
                <artifactId>jaxrs-wiki-processor</artifactId>
                <version>2.2</version>
            </dependency>

        </dependencies>
        <executions>

            <execution>

                <id>process-test</id>
                <goals>
                    <goal>process-test</goal>
                </goals>
                <phase>process-test-classes</phase>
                <configuration>
                    <outputDirectory>${basedir}/src/site</outputDirectory>

                    <additionalSourceDirectories>
                        <item>${user.home}/src</item>
                        <item>./src/main/java</item>
                    </additionalSourceDirectories>

                    <failOnError>false</failOnError>
                    <processors>
                        <processor>org.bsc.maven.plugin.processor.test.TESTWikiProcessor</processor>
                        <!--processor>org.bsc.jaxrs.JAXRSWikiProcessor</processor-->
                    </processors>

                    <options>
                        <test>true</test>
                    </options>
                </configuration>


            </execution>

            <execution>

                <id>process</id>
                <goals>
                    <goal>process</goal>
                </goals>
                <phase>process-classes</phase>
                <configuration>
                    <outputDirectory>${basedir}/src/site</outputDirectory>

                    <additionalSourceDirectories>
                        <item>${basedir}/src/main/java</item>
                        <!--
                        <item>${user.home}/src</item>
                        -->
                    </additionalSourceDirectories>

                    <failOnError>false</failOnError>
                    <processors>
                        <processor>org.bsc.maven.plugin.processor.test.TESTWikiProcessor</processor>
                        <!--
                        <processor>org.bsc.jaxrs.JAXRSWikiProcessor</processor>
                        -->
                    </processors>

                    <options>
                        <test>false</test>
                    </options>
                </configuration>


            </execution>
        </executions>
    </plugin>

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
            <execution>
                <id>add-source</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>add-source</goal>
                </goals>
                <configuration>
                    <sources>
                        <source>${basedir}/src-generated/src</source>
                    </sources>
                </configuration>
            </execution>
            <execution>
                <id>add-test-source</id>
                <phase>generate-test-sources</phase>
                <goals>
                    <goal>add-test-source</goal>
                </goals>
                <configuration>
                    <sources>
                        <source>${basedir}/src-generated/test</source>
                    </sources>
                </configuration>
            </execution>

        </executions>
    </plugin>
</plugins>

</build>

<profiles>
    <profile>
        <id>toolchain</id>
        <build>
            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>toolchain</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <toolchains>
                            <jdk>
                                <version>1.6</version>
                                <vendor>sun</vendor>
                            </jdk>
                        </toolchains>
                    </configuration>
                </plugin>

            </plugins>

        </build>
    </profile>

</profiles>

</project>
