<?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">
	<artifactId>sapmachine-${type}</artifactId>
	<version>${version}</version>

	<modelVersion>4.0.0</modelVersion>
	<groupId>io.sapmachine</groupId>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>SapMachine</description>
	<url>https://sapmachine.io/</url>
	<licenses>
		<license>
			<name>GPLv2 + Classpath Exception</name>
			<url>https://sap.github.io/SapMachine/LICENSE</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>SapMachine</name>
			<email>sapmachine@sap.com</email>
			<organization>SAP SE</organization>
			<organizationUrl>http://www.sap.com</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://github.com/SAP/SapMachine/tree/sapmachine-${project.version}</connection>
		<url>http://github.com/SAP/SapMachine/tree/sapmachine-${project.version}</url>
	</scm>
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>java17</id>
			<activation>
				<property>
					<name>majorVersion</name>
					<value>17</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>flatten-maven-plugin</artifactId>
						<!--<version>1.2.2</version>-->
						<configuration>
								<flattenMode>ossrh</flattenMode>
						</configuration>
						<executions>
							<!-- enable flattening -->
							<execution>
								<id>flatten</id>
								<phase>process-resources</phase>
								<goals>
									<goal>flatten</goal>
								</goals>
							</execution>
							<!-- ensure proper cleanup -->
							<execution>
								<id>flatten.clean</id>
								<phase>clean</phase>
								<goals>
									<goal>clean</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>com.googlecode.maven-download-plugin</groupId>
						<artifactId>download-maven-plugin</artifactId>
						<version>1.6.7</version>
						<executions>
							<execution>
								<id>1</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>2</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>3</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_macos-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>4</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_macos-aarch64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>5</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_windows-x64_bin.zip</url>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</file>
											<classifier>linux-ppc64le</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</file>
											<classifier>linux-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_macos-x64_bin.tar.gz</file>
											<classifier>macos-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_macos-aarch64_bin.tar.gz</file>
											<classifier>macos-aarch64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_windows-x64_bin.zip</file>
											<classifier>windows-x64</classifier>
											<type>zip</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>java18</id>
			<activation>
				<property>
					<name>majorVersion</name>
					<value>18</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>flatten-maven-plugin</artifactId>
						<!--<version>1.2.2</version>-->
						<configuration>
								<flattenMode>ossrh</flattenMode>
						</configuration>
						<executions>
							<!-- enable flattening -->
							<execution>
								<id>flatten</id>
								<phase>process-resources</phase>
								<goals>
									<goal>flatten</goal>
								</goals>
							</execution>
							<!-- ensure proper cleanup -->
							<execution>
								<id>flatten.clean</id>
								<phase>clean</phase>
								<goals>
									<goal>clean</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>com.googlecode.maven-download-plugin</groupId>
						<artifactId>download-maven-plugin</artifactId>
						<version>1.6.7</version>
						<executions>
							<execution>
								<id>1</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>2</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>3</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_macos-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>4</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_macos-aarch64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>5</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_windows-x64_bin.zip</url>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</file>
											<classifier>linux-ppc64le</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</file>
											<classifier>linux-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_macos-x64_bin.tar.gz</file>
											<classifier>macos-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_macos-aarch64_bin.tar.gz</file>
											<classifier>macos-aarch64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_windows-x64_bin.zip</file>
											<classifier>windows-x64</classifier>
											<type>zip</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>java11</id>
			<activation>
				<property>
					<name>majorVersion</name>
					<value>11</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>flatten-maven-plugin</artifactId>
						<!--<version>1.2.2</version>-->
						<configuration>
								<flattenMode>ossrh</flattenMode>
						</configuration>
						<executions>
							<!-- enable flattening -->
							<execution>
								<id>flatten</id>
								<phase>process-resources</phase>
								<goals>
									<goal>flatten</goal>
								</goals>
							</execution>
							<!-- ensure proper cleanup -->
							<execution>
								<id>flatten.clean</id>
								<phase>clean</phase>
								<goals>
									<goal>clean</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>com.googlecode.maven-download-plugin</groupId>
						<artifactId>download-maven-plugin</artifactId>
						<version>1.6.7</version>
						<executions>
							<execution>
								<id>1</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>2</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>3</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_osx-x64_bin.tar.gz</url>
								</configuration>
							</execution>
							<execution>
								<id>4</id>
								<phase>process-resources</phase>
								<goals>
									<goal>wget</goal>
								</goals>
								<configuration>
									<url>https://github.com/SAP/SapMachine/releases/download/sapmachine-${project.version}/${project.artifactId}-${project.version}_windows-x64_bin.zip</url>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-ppc64le_bin.tar.gz</file>
											<classifier>linux-ppc64le</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_linux-x64_bin.tar.gz</file>
											<classifier>linux-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_osx-x64_bin.tar.gz</file>
											<classifier>osx-x64</classifier>
											<type>tar.gz</type>
										</artifact>
										<artifact>
											<file>${project.build.directory}/${project.artifactId}-${project.version}_windows-x64_bin.zip</file>
											<classifier>windows-x64</classifier>
											<type>zip</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
