<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.2</version>
	</parent>

	<artifactId>classgraph-vfs</artifactId>
	<name>ClassGraph virtual filesystem</name>

	<description>A virtual filesystem: reads directories, jarfiles and modules through one interface, however they are named.</description>

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

		<osgiBundleName>ClassGraph virtual filesystem</osgiBundleName>
		<!-- Must list the same packages as the exports in src/main/java/module-info.java. -->
		<osgiExportPackage>io.github.classgraph.vfs;version="${parsedVersion.osgiVersion}";uses:="io.github.classgraph.vfs.reader,io.github.classgraph.base,io.github.classgraph.base.internal.concurrency,io.github.classgraph.base.internal.path,io.github.classgraph.base.internal.reflection,io.github.classgraph.base.internal.utils",io.github.classgraph.vfs.reader;version="${parsedVersion.osgiVersion}";uses:="io.github.classgraph.vfs,io.github.classgraph.base,io.github.classgraph.base.internal.concurrency,io.github.classgraph.base.internal.path,io.github.classgraph.base.internal.reflection,io.github.classgraph.base.internal.utils"</osgiExportPackage>
		<!-- sun.misc is imported optionally because OffHeapMemory looks up Unsafe by name on JDK 17-21, and an
		     OSGi bundle can only load a class from a package it imports. -->
		<osgiImportPackage>io.github.classgraph.base;version="${osgiModuleVersionRange}",io.github.classgraph.base.internal.concurrency;${osgiInternalImport},io.github.classgraph.base.internal.path;${osgiInternalImport},io.github.classgraph.base.internal.reflection;${osgiInternalImport},io.github.classgraph.base.internal.utils;${osgiInternalImport},sun.misc;resolution:="optional",org.jetbrains.annotations;resolution:="optional",org.jspecify.annotations;resolution:="optional"</osgiImportPackage>

		<!-- 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>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>classgraph-base</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jetbrains</groupId>
			<artifactId>annotations</artifactId>
		</dependency>

		<!-- Test dependencies: -->
		<!-- An in-memory filesystem, used to test that a Path in a filesystem other than the default one can be
		     opened -->
		<dependency>
			<groupId>com.google.jimfs</groupId>
			<artifactId>jimfs</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- The benchmarks in src/test/perf -->
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-generator-annprocess</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- The libraries the benchmarks compare against -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-vfs2</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.java.truevfs</groupId>
			<artifactId>truevfs-access</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.java.truevfs</groupId>
			<artifactId>truevfs-kernel-impl</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.java.truevfs</groupId>
			<artifactId>truevfs-driver-file</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.java.truevfs</groupId>
			<artifactId>truevfs-driver-jar</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<!-- TrueVFS needs a key manager at runtime to unmount a zipfile, even one that is not encrypted -->
			<groupId>net.java.truecommons</groupId>
			<artifactId>truecommons-key-disable</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss</groupId>
			<artifactId>jboss-vfs</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<!-- jboss-vfs needs it at runtime, but declares it with "provided" scope -->
			<groupId>org.jboss.logging</groupId>
			<artifactId>jboss-logging</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.squareup.okio</groupId>
			<artifactId>okio-jvm</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-loader</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.netbeans.api</groupId>
			<artifactId>org-openide-filesystems</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<!-- The JDK modules that src/main/java/module-info.java requires, for WildFly: see the -->
							<!-- comment on the manifest entries in the parent pom.xml -->
							<Dependencies>jdk.unsupported</Dependencies>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<execution>
						<!-- Names JMH's annotation processor explicitly, for the reason given on the same
						     execution in classgraph/pom.xml: since JDK 23, javac no longer finds it on the
						     test classpath by itself. -->
						<id>default-testCompile</id>
						<configuration>
							<annotationProcessors>
								<annotationProcessor>org.openjdk.jmh.generators.BenchmarkProcessor</annotationProcessor>
							</annotationProcessors>
							<annotationProcessorPaths>
								<path>
									<groupId>org.openjdk.jmh</groupId>
									<artifactId>jmh-generator-annprocess</artifactId>
								</path>
							</annotationProcessorPaths>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
