<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>io.operon</groupId>
  <artifactId>camel-operon</artifactId>
  <packaging>jar</packaging>
  <version>0.9.2-RELEASE</version>

  <name>Camel Operon Component</name>
  <url>https://operon.io</url>
  <description>Camel-operon is a camel-component for running Operon. 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/camel-operon.git</connection>
    <developerConnection>scm:git:https://github.com/operon-io/camel-operon.git</developerConnection>
    <url>https://github.com/operon-io/camel-operon</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>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <camel.version>3.15.0</camel.version>
    <operon.version>0.9.2-SNAPSHOT</operon.version>
    <jackson.version>2.13.1</jackson.version>
    <log4j.version>2.17.1</log4j.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-component</artifactId>
      <version>${camel.version}</version>
    </dependency>
  
    <!-- Camel BOM -->
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-bom</artifactId>
      <version>${camel.version}</version>
      <scope>compile</scope>
      <type>pom</type>
    </dependency>

    <!-- camel -->
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-support</artifactId>
      <version>${camel.version}</version>
    </dependency>

    <!-- for custom camel-language -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-language</artifactId>
        <version>${camel.version}</version>
    </dependency>
    
    <!-- for custom camel-language -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core-model</artifactId>
        <version>${camel.version}</version>
    </dependency>
  
    <!-- for serializing POJO to/from JSON -->
  	<dependency>
  		<groupId>com.google.code.gson</groupId>
  		<artifactId>gson</artifactId>
  		<version>2.9.0</version>
  	</dependency>
    
    <!-- testing -->
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test</artifactId>
      <version>${camel.version}</version>
      <scope>test</scope>
    </dependency>
    
    <!-- the good stuff -->
    <dependency>
      <groupId>io.operon</groupId>
      <artifactId>operon-runner</artifactId>
      <version>${operon.version}</version>
    </dependency>
    
    <!-- logging -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <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>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <!-- generate camel meta-data -->
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-component-maven-plugin</artifactId>
        <version>${camel.version}</version>
        <executions>
          <execution>
            <id>generate</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>add-source</goal>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/generated/java</source>
              </sources>
              <resources>
                <resource>
                  <directory>src/generated/resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </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>
      
      <plugin>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-package-maven-plugin</artifactId>
         <version>${camel.version}</version>
         <executions>
             <execution>
                 <id>generate</id>
                 <phase>process-classes</phase>
                 <goals>
                     <goal>generate-languages-list</goal>
                 </goals>
             </execution>
         </executions>
         <configuration>
             <failFast>false</failFast>
         </configuration>
      </plugin>
    </plugins>

  </build>

</project>
