<?xml version="1.0" encoding="UTF-8"?>
<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>
        <groupId>org.richfaces.cdk</groupId>
        <artifactId>parent</artifactId>
        <version>4.5.0.Final</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>generator</artifactId>
    <name>RichFaces CDK Generator</name>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>guice-maven-plugin</artifactId>
                <!--<configuration> -->
                <!--<mainClass>mypackage.boot.camel.CamelStartup</mainClass> -->
                <!--</configuration> -->
            </plugin>
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <properties>
                                <sourceSchema>src/main/resources/META-INF/schema/xhtml-el.xsd</sourceSchema>
                                <targetNamespace>http://jboss.org/schema/richfaces/cdk/xhtml-el</targetNamespace>
                                <outputFile>generated-resources/META-INF/cdk/attributes/xhtml-el.xml</outputFile>
                            </properties>
                            <classpath>
                                <element>
                                    <groupId>com.sun.xsom</groupId>
                                    <artifactId>xsom</artifactId>
                                </element>
                            </classpath>
                            <source>${project.basedir}/src/main/script/SchemaAttributesParserTask.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useManifestOnlyJar>false</useManifestOnlyJar>
                    <useSystemClassLoader>true</useSystemClassLoader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${version.site.plugin}</version>
                <executions>
                    <execution>
                        <id>generate-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId>
                   <executions> <execution> <goals> <goal>xjc</goal> </goals> </execution> </executions>
                   <configuration> <packageName>org.richfaces.cdk.model</packageName> </configuration>
                   </plugin -->
        </plugins>
        <resources>
            <resource>
                <directory>
                    src/main/resources
                </directory>
            </resource>
            <resource>
                <directory>
                    ${project.build.directory}/generated-resources
                </directory>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.groovy.maven</groupId>
                                        <artifactId>gmaven-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>execute</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <!-- Java EE -->
        <dependency>
            <groupId>org.jboss.spec.javax.faces</groupId>
            <artifactId>jboss-jsf-api_2.1_spec</artifactId>
        </dependency>

        <!-- CDK -->
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>attributes</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>xinclude</artifactId>
        </dependency>

        <!-- Compile dependencies -->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.el</groupId>
            <artifactId>jboss-el</artifactId>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xsom</groupId>
            <artifactId>xsom</artifactId>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-assistedinject</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-multibindings</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.javaparser</groupId>
            <artifactId>javaparser</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>commons</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
