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

  <parent>
    <artifactId>mojo-parent</artifactId>
    <groupId>org.codehaus.mojo</groupId>
    <version>40</version>
  </parent>
  
  
  <groupId>net.rationalminds</groupId>
  <artifactId>sql-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <version>1.0</version>
  <name>SQL Maven Plugin</name>
  <inceptionYear>2018</inceptionYear>
  <description>Execute SQL Statements</description>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <properties>
    <mavenVersion>3.0</mavenVersion>
    <mojo.java.target>1.6</mojo.java.target>
    <scmpublish.content>target/staging/${project.artifactId}</scmpublish.content>
  </properties>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/mojohaus/${project.artifactId}/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis-CI</system>
    <url>https://travis-ci.org/mojohaus/sql-maven-plugin</url>
  </ciManagement>
  <scm>
    <connection>scm:git:https://github.com/mojohaus/sql-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/mojohaus/sql-maven-plugin.git</developerConnection>
    <url>https://github.com/mojohaus/sql-maven-plugin/</url>
  </scm>

  <developers>
    <developer>
      <id>topping</id>
      <name>Brian Topping</name>
      <email>topping@codehaus.org</email>
      <roles>
        <role>Java Developer</role>
      </roles>
      <timezone>+8</timezone>
    </developer>
    <developer>
      <id>dtran</id>
      <name>Dan Tran</name>
      <email>dantran@apache.org</email>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
    <developer>
      <id>struberg</id>
      <name>Mark Struberg</name>
      <email>struberg@yahoo.de</email>
      <roles>
        <role>Java Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>rfscholte</id>
      <name>Robert Scholte</name>
      <email>rfscholte@codehaus.org</email>
      <roles>
        <role>Java Developer</role>
      </roles>
      <timezone>Europe/Amsterdam</timezone>
    </developer>
    <developer>
      <id>khmarbaise</id>
      <name>Karl-Heinz Marbaise</name>
      <email>khmarbaise@apache.org</email>
      <roles>
        <role>Java Developer</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
    </developer>
    <developer>
      <id>Vaibhav</id>
      <name>Vaibhav Singh</name>
      <email>vbhav.singh@gmail.com</email>
      <roles>
        <role>Java Developer</role>
      </roles>
      <timezone>America/New_york</timezone>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <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>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <goalPrefix>sql</goalPrefix>
        </configuration>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
          <execution>
            <id>help-mojo</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <signature>
            <groupId>org.codehaus.mojo.signature</groupId>
            <artifactId>java16</artifactId>
            <version>1.0</version>
          </signature>
        </configuration>
      </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-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</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.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.3</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>axion</groupId>
      <artifactId>axion</artifactId>
      <version>1.0-M2-dev</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-script-interpreter</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.24</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-interpolation</artifactId>
      <version>1.22</version>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-filtering</artifactId>
      <version>3.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-sec-dispatcher</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${mavenVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>2.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <debug>true</debug>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <!--<preBuildHookScript>setup</preBuildHookScript> -->
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <goals>
                <goal>clean</goal>
                <goal>sql:execute</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test-install</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>install</goal>
                </goals>
                <configuration>
                  <extraArtifacts>
                    <extraArtifact>org.apache.derby:derby:10.11.1.1:jar</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-install-plugin:2.5.2:maven-plugin</extraArtifact>
                  </extraArtifacts>
                </configuration>
              </execution>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
