<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>
  <groupId>fi.metatavu.wso2.liquibase</groupId>
  <artifactId>liquibase-mediator</artifactId>
  <version>1.0.0</version>
  <packaging>bundle</packaging>
  <name>WSO2 Liquibase mediator</name>
  <description>WSO2 mediator for Liquibase database migrations</description>
  <url>https://github.com/Metatavu/wso2-liquibase-mediator</url>
  
  <licenses>
    <license>
      <name>GNU Affero General Public License v3</name>
      <url>http://www.gnu.org/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <name>Metatavu Oy</name>
      <organization>Metatavu Oy</organization>
      <organizationUrl>http://www.metatavu.fi</organizationUrl>
    </developer>
  </developers>

  <properties>
  
    <!-- Project -->

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    
    <!-- Maven -->

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    
    <!-- Versions -->

    <synapse.version>2.1.1-wso2v5</synapse.version>
    <liquibase.version>3.8.0</liquibase.version>
  </properties>
  
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Metatavu/wso2-liquibase-mediator/issues</url>
  </issueManagement>

  <scm>
    <developerConnection>scm:git:git@github.com:Metatavu/wso2-liquibase-mediator.git</developerConnection>
    <url>git@github.com:Metatavu/wso2-liquibase-mediator.git</url>
    <connection>scm:git:git@github.com:Metatavu/wso2-liquibase-mediator.git</connection>
    <tag>liquibase-mediator-1.0.0</tag>
  </scm>

  <organization>
    <name>Metatavu Oy</name>
    <url>http://www.metatavu.fi</url>
  </organization>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>     

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.4</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Name>${project.artifactId}</Bundle-Name>
            <Bundle-Description>${project.description}</Bundle-Description>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Export-Package>${project.groupId}.*</Export-Package>
            <Import-Package>
              !javax.xml.namespace,
              javax.xml.namespace;
              version=0.0.0,
              org.osgi.framework
              *; resolution:=optional
            </Import-Package>
            <DynamicImport-Package>*</DynamicImport-Package>
            <Fragment-Host>synapse-core</Fragment-Host>
          </instructions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>false</useReleaseProfile>
          <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>

      <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>true</autoReleaseAfterClose>
        </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>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.apache.synapse</groupId>
      <artifactId>synapse-core</artifactId>
      <version>${synapse.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.liquibase</groupId>
      <artifactId>liquibase-core</artifactId>
      <version>${liquibase.version}</version>
    </dependency>
  </dependencies>
  
  <repositories>
    <repository>
      <id>wso2-maven2-repository</id>
      <url>http://dist.wso2.org/maven2</url>
    </repository>
    <repository>
      <id>apache-Incubating-repo</id>
      <name>Maven Incubating Repository</name>
      <url>http://people.apache.org/repo/m2-incubating-repository</url>
    </repository>
    <repository>
      <id>apache-maven2-repo</id>
      <name>Apache Maven2 Repository</name>
      <url>http://repo1.maven.org/maven2/</url>
    </repository>
  </repositories>

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

</project>
