<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>csvclient</artifactId>
  <version>0.0.2</version>
  <name>Lablink CSV client</name>
  <description>This package provides a Lablink client that acts as a data source, using data stored in CSV format. </description>
  <url>https://github.com/AIT-Lablink/lablink-csv-client</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>Jawad Kazmi</name>
      <email>jawad.kazmi@ait.ac.at</email>
      <organization>AIT Austrian Institute of Technology</organization>
      <organizationUrl>https://www.ait.ac.at</organizationUrl>
    </developer>
    <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-csv-client.git</connection>
    <developerConnection>scm:git:https://github.com/AIT-Lablink/lablink-csv-client.git</developerConnection>
    <url>http://github.com/AIT-Lablink/lablink-csv-client/tree/master</url>
  </scm>

  <properties>
    <maven.compiler.source>13</maven.compiler.source>
    <maven.compiler.target>13</maven.compiler.target>
    <java.version>13</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>

    <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>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <show>private</show>
          <docfilessubdirs>true</docfilessubdirs>
          <quiet>true</quiet>
          <source>13</source>
        </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>
          <!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> -->
        </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>
              <archive>
                <manifest>
                  <mainClass>at.ac.ait.lablink.clients.csvclient.CsvClient</mainClass>
                </manifest>
              </archive>
              <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.17.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.17.1</version>
      <scope>compile</scope>
    </dependency>
    
    <!-- JSON parsing -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.13.1</version>
    </dependency>

    <!-- Read and write files in CSV format -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <version>1.3</version>
    </dependency>

    <!-- Command line interface -->
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.1</version>
      <scope>compile</scope>
    </dependency>

    <!-- Lablink core -->
    <dependency>
      <groupId>at.ac.ait.lablink</groupId>
      <artifactId>core</artifactId>
      <version>0.0.2</version>
      <scope>compile</scope>
    </dependency>

    <!-- Unit Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>

    <!-- Run-time dependencies to other Lablink packages for testing -->
    <dependency>
      <groupId>at.ac.ait.lablink</groupId>
      <artifactId>config</artifactId>
      <version>0.1.1</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>at.ac.ait.lablink.clients</groupId>
      <artifactId>dpbridge</artifactId>
      <version>0.0.2</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>at.ac.ait.lablink.clients</groupId>
      <artifactId>plotter</artifactId>
      <version>0.0.4</version>
      <classifier>jar-with-dependencies</classifier>
      <scope>provided</scope>
    </dependency>

  </dependencies>

</project>
