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

    Copyright 2021 OPS4J.

    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

        http://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 https://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.ops4j</groupId>
        <artifactId>master</artifactId>
        <version>4.3.0</version>
    </parent>

    <groupId>org.ops4j.pax</groupId>
    <artifactId>cdi</artifactId>
    <version>1.1.4</version>
    <packaging>pom</packaging>

    <name>OPS4J Pax CDI Reactor</name>

    <description>Contexts and Dependency Injection for OSGi Applications</description>

    <url>https://ops4j1.jira.com/wiki/spaces/PAXCDI/overview</url>

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

                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

                http://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.
            </comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/ops4j/org.ops4j.pax.cdi/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/ops4j/org.ops4j.pax.cdi</connection>
        <developerConnection>scm:git:https://github.com/ops4j/org.ops4j.pax.cdi</developerConnection>
        <url>https://github.com/ops4j/org.ops4j.pax.cdi/tree/master</url>
      <tag>cdi-1.1.4</tag>
  </scm>

    <developers>
        <developer>
            <id>hwellmann</id>
            <name>Harald Wellmann</name>
            <email>harald.wellmann@gmx.de</email>
            <organization>independent software developer</organization>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>UTC+1</timezone>
        </developer>
        <developer>
            <id>jbonofre</id>
            <name>Jean-Baptiste Onofre</name>
            <email>jb@nanthrax.net</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>UTC+1</timezone>
        </developer>
        <developer>
            <id>gnodet</id>
            <name>Guillaume Nodet</name>
            <email>gnodet@gmail.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>UTC+1</timezone>
        </developer>
    </developers>

    <properties>
        <plugin.maven-checkstyle-plugin>3.1.2</plugin.maven-checkstyle-plugin>
        <plugin.dependency.com.puppycrawl.tools.checkstyle>8.40</plugin.dependency.com.puppycrawl.tools.checkstyle>
        <plugin.mycila.license-maven-plugin>3.0</plugin.mycila.license-maven-plugin>
    </properties>

    <modules>
        <module>pax-cdi-parent</module>

        <module>pax-cdi-api</module>
        <module>pax-cdi-spi</module>
        <module>pax-cdi-extender</module>
        <module>pax-cdi-extension</module>

        <module>pax-cdi-weld</module>
        <module>pax-cdi-openwebbeans</module>

        <module>pax-cdi-web</module>
        <module>pax-cdi-jetty-weld</module>
        <module>pax-cdi-undertow-weld</module>
        <module>pax-cdi-jetty-openwebbeans</module>
        <module>pax-cdi-undertow-openwebbeans</module>

        <module>pax-cdi-samples</module>

        <module>pax-cdi-features</module>

        <module>pax-cdi-test-support</module>

        <module>pax-cdi-manual</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>

                <!-- Reporting plugins -->

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${plugin.maven-checkstyle-plugin}</version>
                </plugin>

                <!-- Other plugins -->

                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${plugin.mycila.license-maven-plugin}</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>itest</id>
            <modules>
                <module>itest</module>
            </modules>
        </profile>
        <profile>
            <id>tck</id>
            <modules>
                <module>tck</module>
            </modules>
        </profile>
        <profile>
            <id>report</id>
            <modules>
                <module>pax-cdi-report</module>
            </modules>
        </profile>

        <!-- Checkstyle: `mvn -Pcs validate` -->
        <profile>
            <id>cs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>verify-style</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <configLocation>pax-cdi-checks.xml</configLocation>
                                    <suppressionsLocation>pax-cdi-checks-suppressions.xml</suppressionsLocation>
                                    <includes>**/*.java</includes>
                                    <encoding>UTF-8</encoding>
                                    <consoleOutput>true</consoleOutput>
                                    <failsOnError>true</failsOnError>
                                    <failOnViolation>true</failOnViolation>
                                    <logViolationsToConsole>true</logViolationsToConsole>
                                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
<!--                                    <violationSeverity>warning</violationSeverity>-->
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>com.puppycrawl.tools</groupId>
                                <artifactId>checkstyle</artifactId>
                                <version>${plugin.dependency.com.puppycrawl.tools.checkstyle}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- License generation: `mvn -Plicense process-sources` -->
        <profile>
            <id>license</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <configuration>
                            <aggregate>true</aggregate>
                            <useDefaultExcludes>true</useDefaultExcludes>
                            <header>license-header.txt</header>
                            <includes>
                                <include>src/main/java/**/*.java</include>
                                <include>src/test/java/**/*.java</include>
                                <!--<include>**/README</include>-->
                                <include>pom.xml</include>
                                <include>**/*.xml</include>
                                <include>**/*.cfg</include>
                                <include>**/*.properties</include>
                            </includes>
                            <excludes />
                            <mapping>
                                <!--<README>SCRIPT_STYLE</README>-->
                                <cfg>SCRIPT_STYLE</cfg>
                            </mapping>
                            <headerDefinitions>
                                <headerDefinition>license-headers.xml</headerDefinition>
                            </headerDefinitions>
                        </configuration>
                        <executions>
                            <execution>
                                <id>license-format</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>license-check</id>
                                <!-- This is the phase this plugin runs by default. Just an explicit information -->
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
