<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>at.ac.ait.lablink.clients</groupId>
  <artifactId>plotter</artifactId>
  <version>0.0.3</version>
  <name>Lablink Plotter</name>
  <description>This package provides Lablink clients that visualize data as plotted graphs in a separate window. </description>
  <url>https://github.com/ait-lablink/lablink-plotter</url>

  <licenses>
    <license>
      <name>Lablink license</name>
      <url>https://ait-lablink.readthedocs.io/en/latest/availability.html#lablink-license</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Edmund Widl</name>
      <email>edmund.widl@ait.ac.at</email>
      <organization>AIT Austrian Institute of Technology</organization>
      <organizationUrl>https://www.ait.ac.at</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/AIT-Lablink/lablink-plotter.git</connection>
    <developerConnection>scm:git:https://github.com/AIT-Lablink/lablink-plotter.git</developerConnection>
    <url>http://github.com/AIT-Lablink/lablink-plotter/tree/main</url>
  </scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <build>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>

      <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://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
        </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>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.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-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <!-- <compilerArgument>-Xlint:deprecation,unchecked</compilerArgument> -->
          <compilerArgument>-Xlint:unchecked</compilerArgument>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <configuration>
          <show>private</show>
          <docfilessubdirs>true</docfilessubdirs>
          <quiet>true</quiet>
          <source>8</source>
          <excludePackageNames>ptolemy.*</excludePackageNames>
        </configuration>
        <executions>
          <execution>
            <id>javadoc</id>
            <goals>
              <goal>javadoc</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <!-- don't check sources of PtPlot, which have been copied to this project -->
          <excludes>**/ptolemy/**</excludes>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <!-- generate assembly containing all dependencies -->
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <!-- don't attach the generated assembly to the project deploy -->
              <!-- <attach>false</attach> -->
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
              <outputDirectory>target/assembly</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.2</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
              <excludeTransitive>true</excludeTransitive>
              <includeScope>provided</includeScope>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>

  <dependencies>

    <!-- Logging -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.7</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.7</version>
      <scope>compile</scope>
    </dependency>

    <!-- Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <!-- JSON parsing -->
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
      <version>1.1</version>
      <scope>compile</scope>
    </dependency>

    <!-- CLI argument parser -->
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <version>1.8</version>
      <scope>compile</scope>
    </dependency>

    <!-- Lablink core -->
    <dependency>
      <groupId>at.ac.ait.lablink</groupId>
      <artifactId>core</artifactId>
      <version>0.0.1</version>
      <scope>compile</scope>
    </dependency>

    <!-- Run-time dependencies to other Lablink packages for testing -->
    <dependency>
      <groupId>at.ac.ait.lablink</groupId>
      <artifactId>config</artifactId>
      <version>0.1.0</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>at.ac.ait.lablink.clients</groupId>
      <artifactId>dpbridge</artifactId>
      <version>0.0.1</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>at.ac.ait.lablink.clients</groupId>
      <artifactId>sync</artifactId>
      <version>0.0.1</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

  </dependencies>

</project>
