<?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>

  <artifactId>freelib-marc4j</artifactId>
  <packaging>jar</packaging>
  <version>2.6.7</version>
  <name>FreeLib-MARC4J</name>
  <description>An easy to use Application Programming Interface (API) for working with MARC and MARCXML in
    Java.</description>
  <url>https://github.com/ksclarke/freelib-marc4j</url>

  <licenses>
    <license>
      <name>GNU Lesser General Public License, Version 2.1</name>
      <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
      <comments>Licensed under the GNU LGPL 2.1 or later (at your option)</comments>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:ksclarke/freelib-marc4j.git</connection>
    <developerConnection>scm:git:git@github.com:ksclarke/freelib-marc4j.git</developerConnection>
    <url>git@github.com:ksclarke/freelib-marc4j.git</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/ksclarke/freelib-marc4j/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <email>ksclarke@gmail.com</email>
      <name>Kevin S. Clarke</name>
      <url>http://kevinclarke.info</url>
      <roles>
        <role>FreeLib-MARC4J developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>rochkind@jhu.edu</email>
      <name>Jonathan Rochkind</name>
      <url>http://bibwild.wordpress.com/</url>
      <roles>
        <role>Original Developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>bill@dueber.com</email>
      <name>Bill Dueber</name>
      <url>http://robotlibrarian.billdueber.com/</url>
      <roles>
        <role>Original Developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>rh9ec@virginia.edu</email>
      <name>Robert Haschart</name>
      <url>https://github.com/haschart</url>
      <roles>
        <role>Original Developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>ohiocore@GMAIL.COM</email>
      <name>Joe Atzberger</name>
      <url>https://github.com/atz</url>
      <roles>
        <role>Original Developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>sesuncedu@gmail.com</email>
      <name>Simon Spero</name>
      <url>http://www.ibiblio.org/fred2.0</url>
      <roles>
        <role>Original Developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
    <developer>
      <email>mail@bpeters.com</email>
      <name>Bas Peters</name>
      <roles>
        <role>Project Creator</role>
      </roles>
      <timezone>Europe/Amsterdam</timezone>
    </developer>
  </developers>

  <properties>
    <freelib.utils.version>0.4.6</freelib.utils.version>
    <maven.compiler.version>3.1</maven.compiler.version>
    <org.reflections.version>0.9.9-RC1</org.reflections.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>info.freelibrary</groupId>
      <artifactId>freelib-utils</artifactId>
      <version>${freelib.utils.version}</version>
    </dependency>
    <!-- Temporary dependency until samples can be moved into tests -->
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>${org.reflections.version}</version>
    </dependency>
    <!-- End of temporary dependencies -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.version}</version>
        <executions>
          <execution>
            <id>codetable-compile</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/CodeTable*.java</include>
                <include>**/ReverseCodeTable*.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Generates the code table Java source, which is then compiled along with the rest of the project -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>codetable-generator</id>
            <phase>process-sources</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>info.freelibrary.marc4j.converter.impl.CodeTableGenerator</mainClass>
              <arguments>
                <argument>src/main/java/info/freelibrary/marc4j/converter/impl/CodeTableGenerated.java</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>codetable-reverse-generator</id>
            <phase>process-sources</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>info.freelibrary.marc4j.converter.impl.ReverseCodeTableGenerator</mainClass>
              <arguments>
                <argument>src/main/java/info/freelibrary/marc4j/converter/impl/ReverseCodeTableGenerated.java</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <!-- This is a duplication of what's defined in the parent but we need to override here for the one local config -->
          <execution>
            <id>copy-build-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/site</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/target/build-resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <!-- This is a duplication of what's defined in the parent but we need to override here for the one local config -->
          <execution>
            <id>copy-site-resources</id>
            <phase>pre-site</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/jbake</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/src/main/jbake</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <!-- This is the local configuration that required the above two to be included here (so they wouldn't be ignored) -->
          <execution>
            <id>codetable-resources</id>
            <!-- We need this configuration because we run this at an earlier Maven lifecycle -->
            <phase>initialize</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>src/main/resources</directory>
                </resource>
              </resources>
              <outputDirectory>target/classes</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Plugin to generate JavaDocs -->
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <!-- Plugin to run Sonar analysis -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
      </plugin>
      <!-- Plugin to run the project's tests -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <!-- Checks project's code for conformance to coding standards -->
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <!-- Plugin to enforce some rules about the project -->
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
      <!-- Plugin to generate the project's website -->
      <plugin>
        <groupId>br.com.ingenieux</groupId>
        <artifactId>jbake-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <!-- Enables pushing project documentation up to an S3 bucket -->
  <distributionManagement>
    <site>
      <id>s3.site</id>
      <url>s3://projects.freelibrary.info/freelib-marc4j</url>
    </site>
  </distributionManagement>

  <!-- Pulls in standard FreeLibrary Project configuration options -->
  <parent>
    <artifactId>freelib-parent</artifactId>
    <groupId>info.freelibrary</groupId>
    <version>0.0.9</version>
  </parent>

</project>
