<!-- SPDX-FileCopyrightText: 2024 German Aerospace Center <fame@dlr.de>

SPDX-License-Identifier: Apache-2.0 -->
<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>de.dlr.gitlab.fame</groupId>
	<artifactId>protobuf</artifactId>
	<version>2.0.3</version>

	<name>FAME-Protobuf</name>
	<description>Google Protocol Buffer definitions for FAME framework</description>
	<url>https://gitlab.com/fame-framework/fame-protobuf</url>

    <scm>
      <connection>scm:git:https//gitlab.com/fame-framework/fame-protobuf.git</connection>
      <url>https://gitlab.com/fame-framework/fame-protobuf</url>
    </scm> 

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<properties>
		<protobuf.version>3.25.5</protobuf.version>
		<maven.compiler.release>11</maven.compiler.release>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<developers>
		<developer>
			<name>Dr. Christoph Schimeczek</name>
			<email>Christoph.Schimeczek@dlr.de</email>
			<organization>German Aerospace Center (DLR)</organization>
			<organizationUrl>http://www.dlr.de</organizationUrl>
		</developer>
		<developer>
			<name>Dr. Ulrich Frey</name>
			<email>Ulrich.Frey@dlr.de</email>
			<organization>German Aerospace Center (DLR)</organization>
			<organizationUrl>http://www.dlr.de</organizationUrl>
		</developer>
		<developer>
			<name>Dr. Marc Deissenroth</name>
			<email>Marc.Deissenroth@dlr.de</email>
			<organization>German Aerospace Center (DLR)</organization>
			<organizationUrl>http://www.dlr.de</organizationUrl>
		</developer>
		<developer>
			<name>Dr. Benjamin Fuchs</name>
			<email>Benjamin.Fuchs@dlr.de</email>
			<organization>German Aerospace Center (DLR)</organization>
			<organizationUrl>http://www.dlr.de</organizationUrl>
		</developer>
		<developer>
			<name>Dr. A. Achraf El Ghazi</name>
			<email>Aboubakr.ElGhazi@dlr.de</email>
			<organization>German Aerospace Center (DLR)</organization>
			<organizationUrl>http://www.dlr.de</organizationUrl>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java-util</artifactId>
			<scope>compile</scope>
			<version>${protobuf.version}</version>
		</dependency>
	</dependencies>

    <distributionManagement>
	  <snapshotRepository>
		<id>ossrh</id>
		<url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	  <repository>
      	<id>ossrh</id>
    	<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  	  </repository>
    </distributionManagement>

	<build>
	  <sourceDirectory>src</sourceDirectory>
	    <plugins>
    	  <plugin>
      	    <groupId>org.sonatype.plugins</groupId>
      		<artifactId>nexus-staging-maven-plugin</artifactId>
      		<version>1.6.14</version>
      		<extensions>true</extensions>
      		<configuration>
       		  <serverId>ossrh</serverId>
        	  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
        	  <autoReleaseAfterClose>true</autoReleaseAfterClose>
      		</configuration>
    	  </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.1</version>
      		<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>
      		<executions>
        	  <execution>
          	    <id>sign-artifacts</id>
          	    <phase>verify</phase>
          	    <goals>
                  <goal>sign</goal>
         	    </goals>
        	  </execution>
      	    </executions>
    	  </plugin>
		  <plugin>
			<groupId>com.github.os72</groupId>
			<artifactId>protoc-jar-maven-plugin</artifactId>
			<version>3.11.4</version>
			<executions>
			  <execution>
		      <phase>generate-sources</phase>
			  <goals>
				<goal>run</goal>
		      </goals>
			  <configuration>
			    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}</protocArtifact>
				<inputDirectories>
			      <include>src/main/resources</include>
				</inputDirectories>
				<outputTargets>
				  <outputTarget>
				    <type>python</type>
				    <outputDirectory>src/main/python/fameprotobuf</outputDirectory>
				  </outputTarget>
				  <outputTarget>
				    <type>pyi</type>
				    <outputDirectory>src/main/python/fameprotobuf</outputDirectory>
				  </outputTarget>				  
				  <outputTarget>
				    <type>java</type>
				    <outputDirectory>target/generated-java-sources</outputDirectory>
				  </outputTarget>
				</outputTargets>
		      </configuration>
		    </execution>
		  </executions>
	    </plugin>
	  </plugins>
	</build>
</project>
