<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>io.operon</groupId>
    <artifactId>operon-core-parent</artifactId>
    <version>0.9.4-RELEASE</version>
    <packaging>pom</packaging>
 
    <name>Operon.IO Parent</name>
    <url>http://maven.apache.org</url>
    <description>Operon is a programming language which can be easily embedded with JVM-based 
                 languages (Java, Scala, Groovy, Kotlin, Clojure, etc.) or run standalone with the native-version. 
                 Operon is especially great for transforming and handling JSON-data.
    </description>

    <scm>
      <connection>scm:git:https://github.com/operon-io/operon-lang.git</connection>
      <developerConnection>scm:git:https://github.com/operon-io/operon-lang.git</developerConnection>
      <url>https://github.com/operon-io/operon-lang</url>
    </scm>

    <developers>
      <developer>
        <id>tuomas</id>
        <name>Tuomas</name>
        <email>tuomas@operon.io</email>
        <url>https://operon.io</url>
        <organization>Operon.io</organization>
        <organizationUrl>https://operon.io</organizationUrl>
        <roles>
          <role>architect</role>
          <role>developer</role>
        </roles>
      </developer>
    </developers>

    <licenses>
      <license>
        <name>Apache License, Version 2.0</name>
        <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        <distribution>repo</distribution>
      </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.version>3.8.1</junit.version>
        <antlr4.visitor>true</antlr4.visitor>
        <antlr4.listener>true</antlr4.listener>
        <antlr.version>4.10.1</antlr.version>
        <graalvm.version>21.0.0.2</graalvm.version>
        <java.version>11</java.version>
        <gpg.keyname>6A2BE74C</gpg.keyname>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
  <build>
    <plugins>

      <!-- For Java 11 
          https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/
      -->
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <release>11</release>
          </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <keyname>${gpg.keyname}</keyname>
              <passphraseServerId>${gpg.keyname}</passphraseServerId>
            </configuration>
          </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>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
  <profiles>
    
    <profile>
      <id>main</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>jsonparser</module>
        <module>operonparser</module>
        <module>operonrunner</module>
      </modules>
    </profile>
    
    <profile>
      <id>dev</id>
      <modules>
        <module>jsonparser</module>
        <module>operonparser</module>
      </modules>
    </profile>
  </profiles>
</project>
