<?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>org.eclipse.lyo</groupId>
  <artifactId>lyo-parent</artifactId>
  <version>5.1.0.Final</version>
  <packaging>pom</packaging>
  <name>Lyo :: _Parent</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>

    <v.lyo>${project.version}</v.lyo>

    <v.kotlin>1.8.22</v.kotlin>
    <v.dokka>1.8.20</v.dokka>

    <v.jersey>2.35</v.jersey>
    <v.servlet>3.1.0</v.servlet>

    <v.jena>4.8.0</v.jena>
    <v.jackson>2.15.0</v.jackson>
    <v.httpclient>4.5.14</v.httpclient>
    <v.slf4j>1.7.36</v.slf4j>

    <v.guava>32.0.1-jre</v.guava>
  </properties>


  <!-- OSSRH mandated metadata -->
  <url>https://eclipse.org/lyo</url>
  <description>
    The Eclipse Lyo project is focused on providing an SDK to enable adoption of OSLC specifications. OSLC (Open
    Services for Lifecycle Collaboration) is an open community dedicated to reducing barriers for lifecycle tool
    integration. The community authors specifications for exposing lifecycle artifacts through uniform (REST)
    interfaces and relying on Internet and Linked Data standards.
  </description>
  <licenses>
    <license>
      <name>Eclipse Public License 2.0</name>
      <url>http://www.eclipse.org/legal/epl-2.0</url>
    </license>
    <license>
      <name>Eclipse Distribution License 1.0</name>
      <url>http://www.eclipse.org/org/documents/edl-v10.php</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Andrew Berezovskyi</name>
      <email>andrew@berezovskyi.me</email>
      <organization>KTH Royal Institute of Technology</organization>
      <organizationUrl>http://kth.se</organizationUrl>
    </developer>
    <developer>
      <name>Jad El-khoury</name>
      <email>jad@kth.se</email>
      <organization>KTH Royal Institute of Technology</organization>
      <organizationUrl>http://kth.se</organizationUrl>
    </developer>
    <developer>
      <name>Jim Amsden</name>
      <email>jamsden@us.ibm.com</email>
      <organization>IBM</organization>
      <organizationUrl>http://ibm.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://github.com/eclipse/lyo.git</connection>
    <developerConnection>scm:git:git@github.com:eclipse/lyo.git</developerConnection>
    <url>https://github.com/eclipse/lyo</url>
  </scm>


  <modules>
    <module>core/oslc4j-core-build</module>
    <module>domains/oslc-domains</module>
    <module>client</module>
    <module>server</module>

    <module>trs/server</module>
    <module>trs/client</module>
    <module>store</module>
    <module>validation</module>
  </modules>

  <profiles>
    <profile>
      <id>gpg-sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>dev</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>apache-snapshots</id>
          <name>Apache Jena SNAPSHOTS</name>
          <url>https://repository.apache.org/content/groups/snapshots/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
        </repository>
        <repository>
          <id>jena-staging</id>
          <name>Apache Jena staging</name>
          <url>https://repository.apache.org/content/repositories/orgapachejena-1052</url>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
    <profile>
      <id>eclipse-deploy</id>
      <activation>
        <!--TODO disable?-->
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>lyo-releases</id>
          <name>lyo-releases repository</name>
          <url>https://repo.eclipse.org/content/repositories/lyo-releases/</url>
        </repository>
        <repository>
          <id>lyo-snapshots</id>
          <name>lyo-snapshots repository</name>
          <url>https://repo.eclipse.org/content/repositories/lyo-snapshots/</url>
        </repository>
      </repositories>
      <distributionManagement>
        <repository>
          <id>repo.eclipse.org</id>
          <name>Eclipse Lyo Releases</name>
          <url>https://repo.eclipse.org/content/repositories/lyo-releases/</url>
        </repository>
        <snapshotRepository>
          <id>repo.eclipse.org</id>
          <name>Eclipse Lyo Snapshots</name>
          <url>https://repo.eclipse.org/content/repositories/lyo-snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>ossrh-deploy</id>
      <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>
    </profile>
  </profiles>

  <pluginRepositories>
    <pluginRepository>
      <id>dash-licenses-snapshots</id>
      <url>https://repo.eclipse.org/content/repositories/dash-licenses-snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <!--Manual enforcement due to security issues and lack of convergence transitively-->
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${v.httpclient}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>javax.servlet.jsp.jstl</groupId>
        <artifactId>javax.servlet.jsp.jstl-api</artifactId>
        <version>1.2.2</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.lyo.oslc4j.core</groupId>
        <artifactId>oslc4j-core</artifactId>
        <version>${v.lyo}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.lyo.oslc4j.core</groupId>
        <artifactId>oslc4j-jena-provider</artifactId>
        <version>${v.lyo}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.lyo.oslc4j.core</groupId>
        <artifactId>oslc4j-json4j-provider</artifactId>
        <version>${v.lyo}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.xml.bind</groupId>
        <artifactId>jakarta.xml.bind-api</artifactId>
        <version>2.3.3</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-runtime</artifactId>
        <version>2.3.6</version>
      </dependency>

      <dependency>
        <!--CQ 13716-->
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${v.slf4j}</version>
      </dependency>
      <dependency>
        <!--CQ 13717-->
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${v.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${v.slf4j}</version>
      </dependency>
      <dependency>
        <!--CQ 6582-->
        <groupId>stax</groupId>
        <artifactId>stax-api</artifactId>
        <version>1.0.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>jena-core</artifactId>
        <version>${v.jena}</version>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>apache-jena-libs</artifactId>
        <version>${v.jena}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-client</artifactId>
        <version>${v.jersey}</version>
      </dependency>

      <dependency>
        <groupId>jakarta.ws.rs</groupId>
        <artifactId>jakarta.ws.rs-api</artifactId>
        <version>2.1.6</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet</artifactId>
        <version>${v.jersey}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>${v.jersey}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>${v.jersey}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.inject</groupId>
        <artifactId>jersey-hk2</artifactId>
        <version>${v.jersey}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${v.jackson}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.12.0</version>
      </dependency>


      <!--Test-->
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.3.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.9.3</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.22.0</version>
      </dependency>


      <!--Maven Enforcer-->
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.15</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${v.guava}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>1.3.5</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.activation</groupId>
        <artifactId>jakarta.activation-api</artifactId>
        <version>1.2.2</version>
        <scope>provided</scope>
      </dependency>

      <!--Convergence-->
      <dependency>
        <!--net.oauth.core:oauth-httpclient4:jar:20090913-->
        <groupId>net.oauth.core</groupId>
        <artifactId>oauth-consumer</artifactId>
        <version>20100527</version>
      </dependency>
      <!-- https://app.snyk.io/vuln/SNYK-JAVA-ORGAPACHETOMCATEMBED-1080637 -->
      <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-core</artifactId>
        <version>8.5.78</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.11.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.11.0</version>
          <configuration>
            <compilerArgument>-Xlint:fallthrough,unchecked,removal,deprecation,dep-ann,varargs,overloads,serial,try,finally</compilerArgument>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.5.0</version>
          <configuration>
            <tags>
              <!-- See https://stackoverflow.com/questions/55906161/weird-javadoc-error-with-jdk12-for-osgi-version-annotation -->
              <tag>
                <name>OslcSchema</name>
                <placement>X</placement>
              </tag>
              <tag>
                <name>OslcNamespaceDefinition</name>
                <placement>X</placement>
              </tag>
              <tag>
                <name>Deprecated</name>
                <placement>X</placement>
              </tag>
            </tags>
            <!--            <doclint>none</doclint>-->
            <doclint>all,-accessibility,-html,-missing</doclint>
            <links>
              <link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
              <link>https://docs.oracle.com/javaee/7/api/</link>
              <link>https://jena.apache.org/documentation/javadoc/jena/</link>
              <link>https://jena.apache.org/documentation/javadoc/arq/</link>
              <link>https://guava.dev/releases/${v.guava}/api/docs/</link>
            </links>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Surefire Plugin (JUnit) -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
            <!-- Use the console, so we can see more detailed failures during Hudson builds. -->
            <useFile>false</useFile>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.12.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.4.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.3.0</version>
          <executions>
            <execution>
              <id>enforce-maven</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>3.6.0</version>
                  </requireMavenVersion>
                  <requireJavaVersion>
                    <version>11</version>
                  </requireJavaVersion>
                  <bannedDependencies>
                    <excludes>
                      <exclude>xerces</exclude>
                      <exclude>xml-apis</exclude>
                      <exclude>com.sun.xml.bind:jaxb-impl</exclude>

                      <!-- https://github.com/eclipse/lyo/pull/220 -->
                      <!--                    <exclude>log4j:log4j</exclude>-->
                      <!--log4j v2 is not used, just for the future-->
                      <exclude>org.apache.logging.log4j:log4j-core</exclude>
                    </excludes>
                  </bannedDependencies>
                  <banDuplicatePomDependencyVersions/>
                  <requireUpperBoundDeps>
                    <excludes>
                      <!--jersey and jena via commons-compress-->
                      <exclude>org.osgi:org.osgi.core</exclude>
                    </excludes>
                  </requireUpperBoundDeps>
                  <reactorModuleConvergence>
                    <message>The reactor is not valid</message>
                    <ignoreModuleDependencies>false</ignoreModuleDependencies>
                  </reactorModuleConvergence>
                </rules>
                <fail>true</fail>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!--Ignore Dokka in Eclispe M2E configuration. 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.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <versionRange>[1.4.32,)</versionRange>
                    <goals>
                      <goal>javadocJar</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.16.0</version>
        <configuration>
          <generateBackupPoms>false</generateBackupPoms>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>dependencies</report>
              <report>licenses</report>
              <report>modules</report>
              <report>dependency-management</report>
              <report>dependency-convergence</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

</project>
