<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  
  <groupId>org.rosuda.REngine</groupId>
  <artifactId>REngine</artifactId>
  <name>REngine Java interface to R</name>
  <description>REngine API to access R from Java in a backend-independent way.</description>
  <version>2.1.1-SNAPSHOT</version>

  <url>http://github.com/s-u/REngine</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <licenses>
    <license>
      <name>LGPL v2.1</name>
      <url>https://www.gnu.org/licenses/lgpl-2.1.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Simon Urbanek</name>
      <email>simon.urbanek@R-project.org</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/s-u/REngine.git</connection>
    <developerConnection>scm:git:git@github.com:s-u/REngine.git</developerConnection>
    <url>https://github.com/s-u/REngine</url>
  </scm>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
	<artifactId>exec-maven-plugin</artifactId>
	<groupId>org.codehaus.mojo</groupId>
	<version>1.3.2</version>
	<executions>
	  <execution>
	    <id>create mvn structure</id>
	    <phase>generate-sources</phase>
	    <goals>
              <goal>exec</goal>
	    </goals>
	    <configuration>
              <executable>${basedir}/mkmvn.sh</executable>
	    </configuration>
	  </execution>
	</executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>${target.version}</source>
          <target>${target.version}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>target-1.4</id>
      <activation>
	<activeByDefault>true</activeByDefault>
      </activation>
      <properties>
	<target.version>1.4</target.version>
      </properties>
    </profile>
    <profile>
      <id>target-1.6</id>
      <activation>
	<jdk>[9,12)</jdk>
      </activation>
      <properties>
	<target.version>1.6</target.version>
      </properties>
    </profile>
    <profile>
      <id>target-1.7</id>
      <activation>
	<jdk>[12,20)</jdk>
      </activation>
      <properties>
	<target.version>1.7</target.version>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
	  <plugin>
	    <groupId>org.apache.maven.plugins</groupId>
	    <artifactId>maven-gpg-plugin</artifactId>
	    <version>1.6</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-javadoc-plugin</artifactId>
            <version>2.10.2</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>2.4</version>
	    <executions>
	      <execution>
		<id>attach-sources</id>
		<goals>
		  <goal>jar-no-fork</goal>
		</goals>
	      </execution>
	    </executions>
	  </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
  <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>
</project>
