<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>cthul</artifactId>
        <groupId>org.cthul</groupId>
        <version>1.1.0</version>
    </parent>
    <groupId>org.cthul</groupId>
    <artifactId>cthul-objects</artifactId>
    <version>1.2</version>
    <name>Cthul Objects</name>
    <url>http://cthul.org</url>
    <description>
        Object-related tools
    </description>
    <distributionManagement>
        <site>
            <id>cthul-objects-maven-docs</id>
            <url>${project.url.docs}objects/</url>
        </site>
    </distributionManagement>
    <properties>
        <build.freemarker.sourceDirectory>target/generated-sources/freemarker</build.freemarker.sourceDirectory>
    </properties>
    <profiles> 
        <profile>
            <id>gen-data-classes</id>
            <activation>
                <property>
                    <name>!skipGenerateClasses</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.googlecode.fmpp-maven-plugin</groupId>
                        <artifactId>fmpp-maven-plugin</artifactId>
                        <version>1.0</version>
                        <configuration>
                            <cfgFile>src/main/fmpp/config.fmpp</cfgFile>
                            <outputDirectory>${build.freemarker.sourceDirectory}</outputDirectory>
                            <templateDirectory>src/main/fmpp/</templateDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.slf4j</groupId>    
                                <artifactId>log4j-over-slf4j</artifactId>
                                <version>1.6.1</version>
                            </dependency>    
                            <dependency>
                                <groupId>org.slf4j</groupId>    
                                <artifactId>slf4j-simple</artifactId>
                                <version>1.6.1</version>
                            </dependency> 
                        </dependencies>
                    </plugin>    
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>add-fmpp-source</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>add-fmpp-source-site</id>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <sources>
                                <source>${build.freemarker.sourceDirectory}</source>
                            </sources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdk16</id>
            <activation>
                <property>
                    <name>performRelease</name>
                </property>
            </activation>            
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>compile-1.6</id>
                                <phase>compile</phase>    
                                <goals><goal>compile</goal></goals>  
                                <configuration>
                                    <compilerId>eclipse</compilerId>
                                    <source>1.7</source>
                                    <target>1.6</target>
                                    <outputDirectory>${project.build.directory}/classes-1.6</outputDirectory>
                                    <includes>
                                        <include>org/cthul/objects/reflection/**</include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.plexus</groupId>
                                <artifactId>plexus-compiler-eclipse</artifactId>
                                <version>2.3</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package-1.6</id>
                                <phase>package</phase>
                                <goals><goal>jar</goal></goals>
                                <configuration>
                                    <classesDirectory>${project.build.directory}/classes-1.6</classesDirectory>
                                    <classifier>jdk16</classifier>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
        </plugins>    
    </build>
    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.cthul</groupId>
            <artifactId>cthul-matchers</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.twip</groupId>
            <artifactId>twip</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
