<?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>
    <groupId>net.jakubholy.jeeutils.jsfelcheck</groupId>
    <artifactId>jsfelcheck-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <description>Parent POM with common settings.</description>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <modules>
        <module>static-jsfexpression-validator-core</module>
        <module>static-jsfexpression-validator-core-abstracttests</module>
        <module>static-jsfexpression-validator-jsf11</module>
        <module>static-jsfexpression-validator-jsf12</module>
        <module>static-jsfexpression-validator-jsf20</module>
        <module>test-webapp-jsf12</module>
        <module>test-webapp-jsf12-facelets</module>
        <module>test-webapp-jsf20-facelets_owb</module>
        <module>test-webapp-jsf20-jsp</module>
        <module>sun-el-customized-jsf11</module>
        <module>jasper-el-customized-jsf12</module>
        <module>jasper-el-customized-jsf20</module>
        <module>test-webapp-jsf11</module>
    </modules>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <contributors>
        <contributor>
            <name>Jakub Holy</name>
            <email>malyvelky@users.sf.net</email>
            <timezone>GMT+1</timezone>
            <roles />
        </contributor>
    </contributors>

    <scm>
        <connection>scm:git:git@github.com:jakubholynet/static-jsfexpression-validator.git</connection>
        <developerConnection>scm:git:git@github.com:jakubholynet/static-jsfexpression-validator.git
        </developerConnection>
        <url>git@github.com:jakubholynet/static-jsfexpression-validator.git</url>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>0.9.5</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

        
    <dependencies>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.8.5</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.2</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.2</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.8.2</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehause.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.6</version>
                </plugin>

            </plugins>

        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <!--
                                 Releasing:
                                     mvn release:prepare -DautoVersionSubmodules=true
                                     mvn release:perform
                                  -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>release-sign-artifacts</releaseProfiles>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.3</version>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.gmaven.runtime</groupId>
                        <artifactId>gmaven-runtime-1.7</artifactId>
                        <version>1.3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>1.8.2</version>
                    </dependency>
                </dependencies>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <providerSelection>1.7</providerSelection>
                            <sources>
                                <fileset>
                                    <directory>${project.basedir}/src/test/java</directory>
                                    <includes>
                                        <include>**/*.groovy</include>
                                    </includes>
                                </fileset>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <reportPlugins>
                        <!--plugin>
                                       <groupId>org.codehause.mojo</groupId>
                                       <artifactId>findbugs-maven-plugin</artifactId>
                                   </plugin-->
                        <!--plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-checkstyle-plugin</artifactId>
                            <version>2.7</version>
                            <configuration>
                                <configLocation>jh-sun-eclipse-checkstyle.xml</configLocation>
                                <!- - For proper multi-module config see http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html - ->
                                <propertyExpansion>config_loc=${toBeDone}</propertyExpansion>
                                <!- -failsOnError>false</failsOnError- ->
                                <!- -suppressionsLocation></suppressionsLocation- ->
                            </configuration>
                        </plugin-->
                        
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>jdepend-maven-plugin</artifactId>
                            <configuration>
                                <targetJdk>1.6</targetJdk>
                                <outputDirectory>build/maven/${project.artifactId}/target/jdepend-reports</outputDirectory>
                            </configuration>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <!-- My project's Sonatype repository to be used by the release plugin -->
        <repository>
            <id>nexus-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <name>My Nexus Snapshots Repository</name>
            <url>http://oss.sonatype.org/content/repositories/jakubholy-snapshots</url>
        </snapshotRepository>

        <site>
            <id>fake.local</id>
            <url>file:///tmp/maven-site</url>
        </site>
        
    </distributionManagement>

    <profiles>

        <profile>
            <id>release-sign-artifacts</id>

            <properties>
                <gpg.keyname>8A7E15EF</gpg.keyname>
                <!-- GPG Key ID to use for signing -->
            </properties>

            <build>
                <plugins>
                    <!-- Build, sign and deploy: mvn -DperformRelease=true deploy -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.3</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Publish also javadocs when releasing - required by Sonatype -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.6.1</version>
                        <configuration>
                            <show>public</show>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Publish also sources when releasing - required by Sonatype -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <!--
        Note: Jetty 7/8 don't work, throws strange exc. like IllegalStateException: STREAM
        Config: 8.0.4..., connector org.eclipse.jetty.server.nio.SelectChannelConnector
        -->

        <!--profile>
            <id>jetty7</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.mortbay.jetty</groupId>
                            <artifactId>jetty-maven-plugin</artifactId>
                            <version>7.4.4.v20110707</version>
                            <configuration>
                                <scanIntervalSeconds>10</scanIntervalSeconds>
                                <connectors>
                                    <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                                        <port>9999</port>
                                    </connector>
                                </connectors>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile-->

        <profile>
            <!-- For test webapps -->
            <id>jetty6</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <!--This plugin allows to run the example using
                                        mvn -Pjetty6 jetty:run
                                Then go to
                                        http://localhost:9999/<project name>
                             -->
                            <groupId>org.mortbay.jetty</groupId>
                            <!-- BEWARE: The plugin has been renamed to jetty-maven-plugin from v7 on -->
                            <artifactId>maven-jetty-plugin</artifactId>
                            <version>6.1.22</version>
                            <configuration>
                                <scanIntervalSeconds>10</scanIntervalSeconds>
                                <connectors>
                                    <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                                        <port>9999</port>
                                    </connector>
                                </connectors>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

    </profiles>

    <properties>
        <myfaces.jsf12.version>1.2.10</myfaces.jsf12.version>
        <myfaces.jsf20.version>2.1.1</myfaces.jsf20.version>
        <javassist.version>3.15.0-GA</javassist.version>
        <jasper.jsf12.version>6.0.29</jasper.jsf12.version>
        <jasper.jsf20.version>7.0.21</jasper.jsf20.version>
    </properties>

</project>
