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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <protobuf.version>4.33.0</protobuf.version>
    <maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.source>21</maven.compiler.source>
  </properties>

  <groupId>org.openlca</groupId>
  <artifactId>olca-proto-parent</artifactId>
  <version>2.0.2</version>
  <packaging>pom</packaging>

  <modules>
    <module>olca-proto</module>
    <module>olca-grpc</module>
  </modules>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>An implementation of the olca-schema with Protocol Buffers</description>
  <url>https://github.com/GreenDelta/olca-proto</url>

  <licenses>
    <license>
      <name>Mozilla Public License, Version 2.0</name>
      <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>msrocka</id>
      <name>Michael Srocka</name>
      <email>srocka@greendelta.com</email>
      <organization>GreenDelta</organization>
      <organizationUrl>http://www.greendelta.com</organizationUrl>
      <roles>
        <role>owner</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/GreenDelta/olca-proto.git</connection>
    <developerConnection>scm:git:git://github.com/GreenDelta/olca-proto.git</developerConnection>
    <url>https://github.com/GreenDelta/olca-proto</url>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/GreenDelta/olca-proto/issues</url>
  </issueManagement>

  <dependencies>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>${protobuf.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>

    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.7.1</version>
      </extension>
    </extensions>

    <plugins>      

      <plugin>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.7.1</version>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>detect</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

	<profiles>
		<profile>
			<id>deployment</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.2.8</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</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.12.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
          	<groupId>org.sonatype.central</groupId>
          	<artifactId>central-publishing-maven-plugin</artifactId>
          	<version>0.9.0</version>
          	<extensions>true</extensions>
          	<configuration>
            	<publishingServerId>central</publishingServerId>
          	</configuration>
        	</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
