<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>com.developmentontheedge</groupId>
  <artifactId>be-sql</artifactId>
  <version>0.1.0</version>
  <packaging>jar</packaging>
  <url>https://github.com/DevelopmentOnTheEdge/be-sql</url>

  <name>be sql</name>
  <description>Parse SQL and builds its AST.
    Then DBMS specific SQL select statement can be generated.
  </description>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <organization>Development On The Edge</organization>
            <organizationUrl>https://github.com/DevelopmentOnTheEdge</organizationUrl>
        </developer>
    </developers>

  <scm>
      <connection>scm:git:git://github.com/DevelopmentOnTheEdge/be-sql.git</connection>
      <developerConnection>scm:git:ssh://github.com/DevelopmentOnTheEdge/be-sql.git</developerConnection>
      <url>https://github.com/DevelopmentOnTheEdge/be-sql</url>
  </scm>


  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <java.version>1.8</java.version>
    <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>net.java.dev.javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>6.1.2</version>
      <type>jar</type>
    </dependency>

    <dependency>
      <groupId>one.util</groupId>
      <artifactId>streamex</artifactId>
      <version>0.5.4</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>[4.12,)</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.developmentontheedge</groupId>
      <artifactId>xmltest</artifactId>
      <version>0.2.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

       <plugin>
          <groupId>org.sonatype.central</groupId>
          <artifactId>central-publishing-maven-plugin</artifactId>
          <version>0.5.0</version>
          <extensions>true</extensions>
          <configuration>
            <publishingServerId>central</publishingServerId>
            <autoPublish>true</autoPublish>
          </configuration>
        </plugin>

        <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.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>jjtree-javacc</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>net.java.dev.javacc</groupId>
            <artifactId>javacc</artifactId>
            <version>6.1.2</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <arg>-Xlint:all</arg>
          </compilerArgs>
        </configuration>
      </plugin>

   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <quiet>true</quiet>
              <additionalparam>-Xdoclint:none</additionalparam>
              <tags>
                <tag>
                  <name>todo</name>
                  <placement>a</placement>
                  <head>TODO:</head>
                </tag>
                <tag>
                  <name>pending</name>
                  <placement>a</placement>
                  <head>PENDING:</head>
                </tag>
              </tags>
            </configuration>
          </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>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <configLocation>checkstyle.xml</configLocation>
              <encoding>UTF-8</encoding>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>3.1.8</version>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.9</version>
          <configuration>
            <excludes>
              <exclude>**/*com/developmentontheedge/sql/model/ParseException.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SimpleCharStream.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SqlParser.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SqlParserConstants.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SqlParserTokenManager.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SqlParserTokenManager.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/Token.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/TokenMgrError.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/JJTSqlParserState.*</exclude>
              <exclude>**/*com/developmentontheedge/sql/model/SqlParserTreeConstants.*</exclude>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <id>prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.eluder.coveralls</groupId>
          <artifactId>coveralls-maven-plugin</artifactId>
          <version>4.3.0</version>
          <configuration>
            <sourceDirectories>
              <sourceDirectory>${basedir}/target/generated-sources/javacc</sourceDirectory>
              <sourceDirectory>${basedir}/target/generated-sources/jjtree</sourceDirectory>
            </sourceDirectories>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
