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

    Copyright (c) 2010-2024 Sonatype, Inc. and others.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License 2.0
    which accompanies this distribution, and is available at
    https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
      Stuart McCulloch (Sonatype, Inc.) - initial API and implementation

-->

<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.sisu</groupId>
  <artifactId>sisu-inject</artifactId>
  <version>0.9.0.M4</version>
  <packaging>pom</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>Eclipse Sisu: JSR330-based container, Plexus-JSR330 adapter and supporting Maven Mojos</description>

  <url>https://eclipse.dev/sisu/</url>
  <inceptionYear>2010</inceptionYear>
  <organization>
    <name>The Eclipse Foundation</name>
    <url>http://www.eclipse.org/</url>
  </organization>
  <licenses>
    <license>
      <name>Eclipse Public License, Version 2.0</name>
      <url>https://www.eclipse.org/legal/epl-v20.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <mailingLists>
    <mailingList>
      <name>Sisu Developers List</name>
      <subscribe>sisu-dev-subscribe@eclipse.org</subscribe>
      <unsubscribe>sisu-dev-unsubscribe@eclipse.org</unsubscribe>
      <post>sisu-dev@eclipse.org</post>
      <archive>https://www.eclipse.org/lists/sisu-dev</archive>
    </mailingList>
    <mailingList>
      <name>Sisu Users List</name>
      <subscribe>sisu-users-subscribe@eclipse.org</subscribe>
      <unsubscribe>sisu-users-unsubscribe@eclipse.org</unsubscribe>
      <post>sisu-users@eclipse.org</post>
      <archive>https://www.eclipse.org/lists/sisu-users</archive>
    </mailingList>
  </mailingLists>

  <modules>
    <module>org.eclipse.sisu.inject</module>
    <module>org.eclipse.sisu.plexus</module>
    <module>org.eclipse.sisu.mojos</module>
    <module>org.eclipse.sisu.inject.extender</module>
    <module>org.eclipse.sisu.plexus.extender</module>
  </modules>

  <developers>
    <developer>
      <id>mcculls</id>
      <name>Stuart McCulloch</name>
    </developer>
    <developer>
      <id>cstamas</id>
      <name>Tamas Cservenak</name>
    </developer>
    <developer>
      <id>kwin</id>
      <name>Konrad Windszus</name>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/eclipse-sisu/sisu-project.git</connection>
    <developerConnection>scm:git:git@github.com:eclipse-sisu/sisu-project.git</developerConnection>
    <url>https://github.com/eclipse-sisu/sisu-project/tree/main</url>
    <tag>milestones/0.9.0.M4</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/eclipse-sisu/sisu-project/issues</url>
  </issueManagement>
  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/eclipse-sisu/sisu-project/actions/workflows/build.yml?query=branch%3Amain</url>
  </ciManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-central-portal</id>
      <name>Sonatype Central Portal</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-central-portal</id>
      <name>Sonatype Central Portal</name>
      <url>https://repo.maven.apache.org/maven2/</url>
    </repository>
    <site>
      <id>sisu.site-deploy</id>
      <url>scm:git:ssh://git@github.com/eclipse-sisu/sisu-website.git</url>
    </site>
  </distributionManagement>

  <properties>
    <maven.compiler.release>8</maven.compiler.release>
    <!-- Set to same version as release target for consistency -->
    <maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
    <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputTimestamp>2025-05-20T11:29:23Z</project.build.outputTimestamp>

    <!-- Source headers -->
    <sisu.licenseHeader>https://raw.githubusercontent.com/eclipse-sisu/sisu-project/main/license-header-epl2.txt</sisu.licenseHeader>
    <sisu.licenseYear>${project.inceptionYear}-2024</sisu.licenseYear>

    <!-- Versions -->
    <mavenRuntimeVersion>3.2.5</mavenRuntimeVersion>
    <mavenBuildVersion>3.9.9</mavenBuildVersion>
    <javaBuildVersion>17</javaBuildVersion>
    <mavenPluginToolsVersion>3.15.1</mavenPluginToolsVersion>
    <asmVersion>9.8</asmVersion>
    <!-- define empty, as jacoco is only conditionally executed (https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html) -->
    <argLine />
  </properties>

  <dependencyManagement>
    <dependencies>

      <!--
       | Internal modules (reactor)
      -->
      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.inject</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.plexus</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>sisu-maven-plugin</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!--
       | Sisu is compatible with Guice 3.0+
      -->
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>4.0</version>
      </dependency>

      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asmVersion}</version>
      </dependency>

      <!--
       | Plexus classloading/utilities
      -->
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-annotations</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-classworlds</artifactId>
        <version>2.6.0</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.5.1</version>
      </dependency>

      <!--
       | Optional support dependencies
      -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.36</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-nop</artifactId>
        <version>1.7.36</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.core</artifactId>
        <version>5.0.0</version>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>javax.enterprise</groupId>
        <artifactId>cdi-api</artifactId>
        <version>1.2</version>
        <exclusions>
          <exclusion>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.interceptor</groupId>
            <artifactId>javax.interceptor-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-servlet</artifactId>
        <version>4.0</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version><!-- older version not supported by junit-vintage runner -->
      </dependency>
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.7</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.13</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-assistedinject</artifactId>
        <version>4.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.framework</artifactId>
        <version>7.0.5</version>
      </dependency>
      <dependency>
        <groupId>org.sonatype.plexus</groupId>
        <artifactId>plexus-build-api</artifactId>
        <version>0.0.7</version>
      </dependency>

      <!--
       | org.eclipse.sisu.mojos specific
      -->
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${mavenPluginToolsVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>maven-common-artifact-filters</artifactId>
        <version>3.4.0</version>
      </dependency>

      <!--
       | Testing
      -->
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.12.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <extensions>
      <extension>
        <groupId>eu.maveniverse.maven.njord</groupId>
        <artifactId>extension</artifactId>
        <version>0.5.3</version>
      </extension>
    </extensions>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.5.0</version>
          <configuration>
            <rules>
              <enforceBytecodeVersion>
                <maxJdkVersion>${maven.compiler.target}</maxJdkVersion>
                <excludes>
                  <!-- Used in tests only -->
                  <exclude>org.junit.jupiter:junit-jupiter-api</exclude>
                  <exclude>org.junit.platform:junit-platform-commons</exclude>
                  <exclude>org.apache.felix:org.apache.felix.framework</exclude>
                </excludes>
              </enforceBytecodeVersion>
              <requireMavenVersion>
                <version>${mavenBuildVersion}</version>
              </requireMavenVersion>
              <requireJavaVersion>
                <version>${javaBuildVersion}</version>
              </requireJavaVersion>
            </rules>
          </configuration>
          <executions>
            <execution>
              <id>enforce-versions</id>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>extra-enforcer-rules</artifactId>
              <version>1.8.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.0</version>
          <configuration>
            <proc>none</proc>
            <showDeprecation>true</showDeprecation>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${mavenPluginToolsVersion}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-report-plugin</artifactId>
          <version>${mavenPluginToolsVersion}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.3</version>
          <configuration>
            <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.5.3</version>
        </plugin>
        <plugin>
          <groupId>biz.aQute.bnd</groupId>
          <artifactId>bnd-maven-plugin</artifactId>
          <version>7.1.0</version>
          <configuration>
            <bnd><![CDATA[
Bundle-Copyright: Copyright (c) 2010-present Sonatype, Inc. and others
Bundle-DocURL: http://www.eclipse.org/sisu/
-noextraheaders: true
-snapshot: SNAPSHOT
            ]]></bnd>
          </configuration>
          <executions>
            <execution>
              <id>bnd-process</id>
              <goals>
                <goal>bnd-process</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.2</version>
          <executions>
            <execution>
              <id>default-jar</id>
              <configuration>
                <archive>
                  <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                </archive>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.4</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.13</version>
          <configuration>
            <excludes>
              <exclude>**/asm/*</exclude>
              <exclude>Incomplete*</exclude>
            </excludes>
            <append>true</append>
          </configuration>
          <executions>
            <execution>
              <id>jacoco-prepare</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>jacoco-report</id>
              <phase>verify</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <title>${project.name}</title>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Psisu-release -Dtest=none</arguments>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
            <scmCommentPrefix>|</scmCommentPrefix>
            <goals>deploy</goals>
            <signTag>true</signTag>
            <tagNameFormat>milestones/@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.21.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.3.0</version>
          <configuration>
            <scmBranch>gh-pages</scmBranch>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>3.9.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.11.2</version>
          <configuration>
            <overview>${basedir}/overview.html</overview>
            <excludePackageNames>*.internal,*.asm</excludePackageNames>
            <additionalJOption>-Xdoclint:all,-missing</additionalJOption>
            <detectOfflineLinks>false</detectOfflineLinks>
            <quiet>true</quiet>
            <notimestamp>true</notimestamp>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.7</version>
          <configuration>
            <useAgent>true</useAgent>
          </configuration>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.9.0</version>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>2.44.4</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.sisu</groupId>
          <artifactId>sisu-maven-plugin</artifactId>
          <version>0.9.0.M3</version>
          <executions>
            <execution>
              <id>index-project</id>
              <goals>
                <goal>main-index</goal>
                <goal>test-index</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--
        Plugin is set to work in "aggregate" mode, so invoke it from root directory of checkout combined with -N:
        mvn -N license:check to check or mvn -N license:format to format sources. Using it manually for now.
        -->
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>5.0.0</version>
          <configuration>
            <aggregate>true</aggregate>
            <strictCheck>true</strictCheck>
            <useDefaultExcludes>false</useDefaultExcludes>
            <licenseSets>
              <licenseSet>
                <header>${sisu.licenseHeader}</header>
                <includes>
                  <include>**/pom.xml</include>
                  <include>**/*.xml</include>
                  <include>**/*.xsd</include>
                  <include>**/*.xjb</include>
                  <include>**/*.mdo</include>
                  <include>**/*.properties</include>
                  <include>**/*.java</include>
                  <include>**/*.groovy</include>
                  <include>**/*.scala</include>
                  <include>**/*.aj</include>
                  <include>**/*.js</include>
                  <include>**/*.css</include>
                </includes>
                <excludes>
                  <exclude>.mvn/**</exclude>
                  <exclude>bin/**</exclude>
                  <exclude>docs/**</exclude>
                  <exclude>leftovers/**</exclude>
                  <exlude>**/src/main/java/org/eclipse/sisu/space/asm/**</exlude>
                  <exclude>**/target/**</exclude>
                  <exclude>**/conf/**</exclude>
                  <exclude>**/.*</exclude>
                  <exclude>**/pkg/**</exclude>
                  <exclude>**/.idea/**</exclude>
                  <exclude>**/release.properties</exclude>
                  <exclude>**/pom.xml.releaseBackup</exclude>
                  <exclude>release.sh</exclude>
                  <exclude>**/src/test/**</exclude>
                </excludes>
              </licenseSet>
            </licenseSets>
            <properties>
              <year>${sisu.licenseYear}</year>
            </properties>
            <mapping>
              <scala>JAVADOC_STYLE</scala>
              <xjb>XML_STYLE</xjb>
              <mdo>XML_STYLE</mdo>
            </mapping>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <configuration>
              <groups>
                <group>
                  <title>Sisu Container</title>
                  <packages>org.eclipse.sisu*:org.sonatype.inject</packages>  
                </group>
                <group>
                  <title>Plexus API</title>
                  <packages>org.codehaus.plexus*:org.eclipse.sisu.plexus</packages>  
                </group>
              </groups>
            </configuration>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>spotless</id>
      <activation>
        <file>
          <exists>${basedir}/../sisu-eclipse-codestyle.xml</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <configuration>
              <java>
                <eclipse>
                  <file>${basedir}/../sisu-eclipse-codestyle.xml</file>
                </eclipse>
                <includes>
                  <include>src/**/*.java</include>
                </includes>
                <excludes>
                  <exclude>src/**/asm/*.java</exclude>
                </excludes>
              </java>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sisu-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- not all sub modules have tests yet, but those additional executions don't do any harm -->
    <profile>
      <id>code-coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
