<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>

	<parent>
		<groupId>io.github.classgraph</groupId>
		<artifactId>classgraph-parent</artifactId>
		<version>5.0.0</version>
	</parent>

	<artifactId>classgraph-base</artifactId>
	<name>ClassGraph base</name>

	<description>The helper classes shared by the ClassGraph libraries: path and URL handling, logging, reflection, and concurrency. This library's only public API is the verbose log that ClassGraph writes what it is doing to, and it is not useful on its own.</description>

	<properties>
		<!-- The shared files (the code formatter profile and the license) are one directory up -->
		<rootDir>${project.basedir}/..</rootDir>

		<!-- The internal packages are exported to the modules that sit on top of this one, and those cannot be on
		     the module path while this module is compiled. javac cannot check the target of such an export, and
		     warns that the module was not found, which -Werror would turn into a build failure. -->
		<javacLintSuppressions>-Xlint:-exports,-module</javacLintSuppressions>

		<osgiBundleName>ClassGraph base</osgiBundleName>
		<!-- Must list the same packages as the exports in src/main/java/module-info.java. The internal
		     packages are exported because OSGi has no equivalent of a qualified export, and the modules
		     above this one need them. They are marked x-internal so that tooling does not offer them for
		     import, and they are not covered by the project's API compatibility guarantees. -->
		<osgiExportPackage>io.github.classgraph.base;version="${project.version}",io.github.classgraph.base.internal.concurrency;x-internal:=true,io.github.classgraph.base.internal.path;x-internal:=true,io.github.classgraph.base.internal.reflection;x-internal:=true,io.github.classgraph.base.internal.utils;x-internal:=true</osgiExportPackage>
		<!-- Narcissus is imported optionally because ReflectionUtils looks it up by name, and an OSGi bundle can
		     only load a class from a package it imports. -->
		<osgiImportPackage>io.github.toolfactory.narcissus;resolution:="optional",org.jspecify.annotations;resolution:="optional"</osgiImportPackage>
		<osgiDependencies>java.logging</osgiDependencies>

		<!-- This module has sources and produces a jar, so it needs the ecj checks and the license copies -->
		<maven.antrun.skip>false</maven.antrun.skip>
		<maven.resources.skip>false</maven.resources.skip>
	</properties>

	<!-- Versions are pinned in the parent's dependencyManagement section -->
	<dependencies>
		<!-- Optional runtime dependency: if Narcissus is on the classpath, it is used as the reflection driver -->
		<dependency>
			<groupId>io.github.toolfactory</groupId>
			<artifactId>narcissus</artifactId>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<!-- META-INF/maven/.../version.properties, which VersionFinder reads the version of this module from.
			     Only this directory is filtered, so that no other resource can have a ${...} replaced. -->
			<resource>
				<directory>src/main/resources-filtered</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
	</build>
</project>
