<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright © 2016 Schlichtherle IT Services

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>global.namespace.neuron-di</groupId>
    <artifactId>neuron-di-parent</artifactId>
    <version>4.1</version>
    <packaging>pom</packaging>

    <name>Neuron DI Parent</name>
    <description>
        Neuron DI is an ultra-light dependency injection framework which
        emphasizes the beauty and power of lazy dependency resolution and
        caching.
    </description>
    <url>https://github.com/christian-schlichtherle/neuron-di</url>
    <inceptionYear>2016</inceptionYear>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <organization>
        <name>Schlichtherle IT Services</name>
        <url>http://schlichtherle.de</url>
    </organization>
    <developers>
        <developer>
            <name>Christian Schlichtherle</name>
            <email>christian AT schlichtherle DOT de</email>
            <organization>Schlichtherle IT Services</organization>
            <timezone>Europe/Berlin</timezone>
            <roles>
                <role>owner</role>
            </roles>
            <properties>
                <picUrl>http://www.gravatar.com/avatar/e2f69ddc944f8891566fc4b18518e4e6.png</picUrl>
            </properties>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/christian-schlichtherle/neuron-di.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/christian-schlichtherle/neuron-di.git</developerConnection>
        <url>https://github.com/christian-schlichtherle/neuron-di</url>
      <tag>neuron-di-4.1</tag>
    </scm>

    <modules>
        <module>core</module>
        <module>core-scala</module>
        <module>guice</module>
        <module>guice-scala</module>
    </modules>

    <properties>
        <!-- maven-compiler-plugin -->
        <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
        <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>

        <!-- various plugins -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>

        <!-- scala-maven-plugin -->
        <scala.compat.version>2.11</scala.compat.version>
        <scala.version>2.11.3</scala.version>

        <guice.version>3.0</guice.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>neuron-di</artifactId>
                <version>4.1</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>neuron-di-guice</artifactId>
                <version>4.1</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>neuron-di-scala_${scala.compat.version}</artifactId>
                <version>4.1</version>
            </dependency>

            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.10.19</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-reflect</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang.modules</groupId>
                <artifactId>scala-xml_${scala.compat.version}</artifactId>
                <version>1.0.5</version>
            </dependency>
            <dependency>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest_${scala.compat.version}</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>5.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
             <plugins>
                 <plugin>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <version>1.8</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-clean-plugin</artifactId>
                     <version>3.0.0</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.5.1</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-deploy-plugin</artifactId>
                     <version>2.8.2</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-gpg-plugin</artifactId>
                     <version>1.6</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-install-plugin</artifactId>
                     <version>2.5.2</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <version>2.10.4</version>
                     <configuration>
                         <quiet>true</quiet>
                     </configuration>
                 </plugin>
                 <plugin>
                     <artifactId>maven-jar-plugin</artifactId>
                     <version>3.0.2</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-release-plugin</artifactId>
                     <version>2.5.3</version>
                     <configuration>
                         <autoVersionSubmodules>true</autoVersionSubmodules>
                         <releaseProfiles>release</releaseProfiles>
                         <useReleaseProfile>false</useReleaseProfile>
                     </configuration>
                 </plugin>
                 <plugin>
                     <artifactId>maven-remote-resources-plugin</artifactId>
                     <version>1.5</version>
                     <executions>
                         <execution>
                             <id>add-license</id>
                             <goals>
                                 <goal>process</goal>
                             </goals>
                             <configuration>
                                 <resourceBundles>
                                     <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                                 </resourceBundles>
                             </configuration>
                         </execution>
                     </executions>
                 </plugin>
                 <plugin>
                     <artifactId>maven-resources-plugin</artifactId>
                     <version>3.0.1</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-shade-plugin</artifactId>
                     <version>2.4.3</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-source-plugin</artifactId>
                     <version>3.0.1</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <version>2.19.1</version>
                 </plugin>
                 <plugin>
                     <groupId>com.mycila</groupId>
                     <artifactId>license-maven-plugin</artifactId>
                     <version>3.0</version>
                     <configuration>
                         <excludes>
                             <exclude>.*</exclude>
                             <exclude>LICENSE</exclude>
                         </excludes>
                         <inlineHeader>
Copyright © ${project.inceptionYear} ${project.organization.name}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
                         </inlineHeader>
                         <mapping>
                             <java>SLASHSTAR_STYLE</java>
                             <scala>SLASHSTAR_STYLE</scala>
                         </mapping>
                     </configuration>
                     <executions>
                         <execution>
                             <goals>
                                 <goal>check</goal>
                             </goals>
                             <phase>validate</phase>
                         </execution>
                     </executions>
                 </plugin>
                 <plugin>
                     <groupId>net.alchim31.maven</groupId>
                     <artifactId>scala-maven-plugin</artifactId>
                     <version>3.2.2</version>
                     <configuration>
                         <args>
                             <arg>-deprecation</arg>
                             <arg>-explaintypes</arg>
                             <arg>-feature</arg>
                             <arg>-target:jvm-${maven.compiler.target}</arg>
                             <arg>-unchecked</arg>
                         </args>
                         <compileOrder>JavaThenScala</compileOrder>
                         <compilerPlugins>
                             <compilerPlugin>
                                 <groupId>org.scalamacros</groupId>
                                 <artifactId>paradise_${scala.version}</artifactId>
                                 <version>2.1.0</version>
                             </compilerPlugin>
                         </compilerPlugins>
                         <recompileMode>incremental</recompileMode>
                     </configuration>
                 </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>build-helper-maven-plugin</artifactId>
                     <version>1.12</version>
                 </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>exec-maven-plugin</artifactId>
                     <version>1.5.0</version>
                 </plugin>
                 <plugin>
                     <groupId>org.jacoco</groupId>
                     <artifactId>jacoco-maven-plugin</artifactId>
                     <version>0.7.7.201606060606</version>
                     <executions>
                         <execution>
                             <id>default-prepare-agent</id>
                             <goals>
                                 <goal>prepare-agent</goal>
                             </goals>
                         </execution>
                         <execution>
                             <id>default-report</id>
                             <phase>prepare-package</phase>
                             <goals>
                                 <goal>report</goal>
                             </goals>
                         </execution>
                         <execution>
                             <id>default-report-aggregate</id>
                             <phase>prepare-package</phase>
                             <goals>
                                 <goal>report-aggregate</goal>
                             </goals>
                         </execution>
                     </executions>
                 </plugin>
                 <plugin>
                     <groupId>org.scalatest</groupId>
                     <artifactId>scalatest-maven-plugin</artifactId>
                     <version>1.0</version>
                     <executions>
                         <execution>
                             <id>scala-test-run</id>
                             <goals>
                                 <goal>test</goal>
                             </goals>
                         </execution>
                     </executions>
                 </plugin>
             </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>non-transitive-test-sources-dependencies</id>
            <activation>
                <file>
                    <exists>src/test</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-core</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>non-transitive-java-test-sources-dependencies</id>
            <activation>
                <file>
                    <exists>src/test/java</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>non-transitive-scala-test-sources-dependencies</id>
            <activation>
                <file>
                    <exists>src/test/scala</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.scalatest</groupId>
                    <artifactId>scalatest_${scala.compat.version}</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>dont-compile-java-main-sources</id>
            <activation>
                <file>
                    <missing>src/main/java</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-compile</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>compile-scala-main-sources</id>
            <activation>
                <file>
                    <exists>src/main/scala</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>scala-main-compile</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-compile-java-test-sources</id>
            <activation>
                <file>
                    <missing>src/test/java</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-testCompile</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>compile-scala-test-sources</id>
            <activation>
                <file>
                    <exists>src/test/scala</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>scala-test-compile</id>
                                <phase>process-test-resources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                    <goal>testCompile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.scalatest</groupId>
                        <artifactId>scalatest-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-add-license</id>
            <activation>
                <file>
                    <missing>src/main</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-remote-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>add-license</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-attach-sources</id>
            <activation>
                <file>
                    <missing>src/main</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-attach-javadocs</id>
            <activation>
                <file>
                    <missing>src/main/java</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-attach-scaladocs</id>
            <activation>
                <file>
                    <missing>src/main/scala</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-scaladocs</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-remote-resources-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-scaladocs</id>
                                <goals>
                                    <goal>doc-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>analyze-test-coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dont-analyze-test-coverage</id>
            <activation>
                <file>
                    <missing>src/main/java</missing>
                </file>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>default-prepare-agent</id>
                                    <phase>none</phase>
                                </execution>
                                <execution>
                                    <id>default-report</id>
                                    <phase>none</phase>
                                </execution>
                                <execution>
                                    <id>default-report-aggregate</id>
                                    <phase>none</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
