<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.jzy3d</groupId>
		<artifactId>jzy3d-all</artifactId>
		<version>3.0.0-SNAPSHOT</version>
	</parent>

	<artifactId>jzy3d-native-panama-gl-swt</artifactId>
	<name>Jzy3d Native Implementation with PanamaGL for SWT</name>

	<properties>
		<version.java>22</version.java>
		<version.panamagl>1.3.0</version.panamagl>
	</properties>


	<dependencies>
		<!-- PUBLIC CORE JZY3D MODULES -->
		<dependency>
			<groupId>org.jzy3d</groupId>
			<artifactId>jzy3d-native-panama-gl-core</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>org.jzy3d</groupId>
			<artifactId>jzy3d-core-swt</artifactId>
			<version>${project.version}</version>
		</dependency>

		<!-- PANAMA GL -->
		<dependency>
			<groupId>org.jzy3d</groupId>
			<artifactId>panama-gl-ui-swt</artifactId>
			<version>${version.panamagl}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>

			<!-- COMPILER AND JAVA VERSION CONFIGURATION -->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${version.java}</source>
					<target>${version.java}</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- On macOS, SWT requires the JVM to be started with -XstartOnFirstThread because
		     Cocoa demands the main thread for any UI/Display operation. Without it,
		     `new Display()` throws SWTException("Invalid thread access") and every
		     TestPanamaGLSWTCanvas test fails in setup. Mirrors the configuration used by
		     panama-gl-ui-swt's own surefire profile. -->
		<profile>
			<id>mac</id>
			<activation>
				<os>
					<family>mac</family>
				</os>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<trimStackTrace>false</trimStackTrace>
							<argLine>-XstartOnFirstThread --enable-native-access=ALL-UNNAMED</argLine>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
