<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>com.github.chrisruffalo</groupId>
    <artifactId>ee-config</artifactId>
    <version>1.4</version>
    <packaging>jar</packaging>
    <name>ee-config</name>
    <description>annotations and helpers for easier configuration of ee applications</description>
    <url>https://github.com/chrisruffalo/ee-config</url>

    <!-- use sonatype parent for releases -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <properties>
        <!-- source output version -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- configuration version -->
        <commons.configuration.version>1.9</commons.configuration.version>

        <!-- arquillian testing -->
        <arquillian.version>1.1.1.Final</arquillian.version>
        
        <!-- timesetamp magic / property replacement -->
        <maven.build.timestamp.format>yyyy/MM/dd - hh:mm:ss a (Z)</maven.build.timestamp.format>
        <local.build.timestamp>${maven.build.timestamp}</local.build.timestamp>
    </properties>
    
    <!-- developers -->
    <developers>
        <developer>
            <name>Chris Ruffalo</name>
            <id>cruffalo</id>
        </developer>
    </developers>
    
    <!-- scm information for buildnumber plugin and maven releases -->
    <scm>
        <connection>scm:git:git@github.com:chrisruffalo/ee-config.git</connection>
        <url>scm:git:git@github.com:chrisruffalo/ee-config.git</url>
        <developerConnection>scm:git:git@github.com:chrisruffalo/ee-config.git</developerConnection>
      <tag>ee-config-1.4</tag>
  </scm>

    <!-- licensing information -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- manage dependency groups -->
    <dependencyManagement>
        <dependencies>
            <!-- weld -->
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-core-bom</artifactId>
                <version>1.1.16.Final</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <scope>import</scope>
                <type>pom</type>
                <version>${arquillian.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- manage individual dependencies -->
    <dependencies>
        <!-- configuration -->
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>${commons.configuration.version}</version>
        </dependency>
    
        <!-- relevant CDI/weld bits -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <scope>runtime</scope>
        </dependency>        

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- only need this during testing -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.13</version>
            <scope>test</scope>
        </dependency>

        <!-- guava is used to make copying files easier during test -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        
        <!-- with arquillian -->
		<dependency>
		    <groupId>org.jboss.arquillian.junit</groupId>
		    <artifactId>arquillian-junit-container</artifactId>
		    <scope>test</scope>
		</dependency>        
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-weld-se-embedded-1.1</artifactId>
            <version>1.0.0.CR7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <!-- resource filtering -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*.xml</exclude>
                    <exclude>**/*.properties</exclude>
                </excludes>
                <filtering>false</filtering>
            </resource>
        </resources>

        <!-- test resource filtering -->
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <excludes>
                    <exclude>**/*.xml</exclude>
                    <exclude>**/*.properties</exclude>
                </excludes>
                <filtering>false</filtering>
            </testResource>
        </testResources>

        <plugins>
            <!-- SCM Revision for use in build -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- use only the first 5 characters of the git revision -->
                    <shortRevisionLength>5</shortRevisionLength>
                    <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                </configuration>
            </plugin>
        </plugins>

        <!-- manage default plugin behavior -->
        <pluginManagement>
            <plugins>
                <!-- use java 6 through maven compiler 2.5 -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <verbose>true</verbose>
                        <source>1.7</source>
                        <target>1.7</target>
                        <fork>true</fork>
                        <compilerVersion>1.7</compilerVersion>
                    </configuration>
                </plugin>
                
                <!-- use modern maven release plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                
                <!-- sync with eclipse (download code, etc) -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.8</version>
                    <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>true</downloadJavadocs>
                    </configuration>
                </plugin>

                <!--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.apache.maven.plugins
                                        </groupId>
                                        <artifactId>
                                            maven-dependency-plugin
                                        </artifactId>
                                        <versionRange>
                                            [2.1,)
                                        </versionRange>
                                        <goals>
                                            <goal>unpack</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
