<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>org.sodeac</groupId>
  <artifactId>org.sodeac.common</artifactId>
  <version>0.1.0</version>
  
  <name>Sodeac Common</name>
  <description>Helper tools for sodeac project</description>
  <packaging>bundle</packaging>
  
 <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jdk.version>1.8</jdk.version>
    <bundle.version>0.1.0</bundle.version>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
	    <groupId>org.apache.maven.plugins</groupId>
	    <artifactId>maven-source-plugin</artifactId>
	    <version>3.0.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>3.0.0</version>
        <executions>
	        <execution>
	          <id>attach-javadocs</id>
	          <goals>
	            <goal>jar</goal>
	          </goals>
	        </execution>
	     </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>${jdk.version}</source>
          <target>${jdk.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
		<executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <version>4.1.0</version>
        <configuration>
          <instructions>
          	<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${bundle.version}</Bundle-Version>
            <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
            <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
            <Implementation-Build>${scmBranch}@r${buildNumber}</Implementation-Build>
            <Export-Package>
            	org.sodeac.common;version="${bundle.version}",
            	org.sodeac.common.eip;version="${bundle.version}",
            	org.sodeac.common.function;version="${bundle.version}"
            </Export-Package>
          </instructions>
          <source>${jdk.version}</source>
          <target>${jdk.version}</target>
        </configuration>
      </plugin>
      </plugins>
  </build>
  
  <profiles>
	<profile>
		<id>release-sign-deploy-artifacts</id>
		<activation>
			<property>
				<name>performRelease</name>
				<value>true</value>
			</property>
		</activation>
		<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-gpg-plugin</artifactId>
					<version>1.6</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
							<configuration>
								<keyname>${gpg.keyname}</keyname>
								<passphraseServerId>${gpg.keyname}</passphraseServerId>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</build>
	</profile>
  </profiles>
  
  <licenses>
	<license>
	  <name>Eclipse Public License v2.0</name>
	  <url>http://www.eclipse.org/legal/epl-v20.html</url>
	</license>
  </licenses>
  
  <developers>
    <developer>
      <id>sebastian.palarus</id>
      <name>Sebastian Palarus</name>
    </developer>
  </developers>
  
  <scm>
	<connection>scm:git:https://github.com/spalarus/java-sodeac-common.git</connection>
	<url>https://github.com/spalarus/java-sodeac-common.git</url>
  </scm>
  
  <url>https://github.com/spalarus/java-sodeac-common</url>
</project>
