<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>uk.nhs.ciao</groupId>
  <artifactId>ciao-configuration</artifactId>
  <packaging>jar</packaging>
  <version>0.1</version>
  <name>ciao-configuration</name>
  <description>Library for managing configuration of CIAO CIPs</description>
  <url>https://github.com/nhs-ciao/ciao-utils/tree/master/ciao-configuration</url>
  <licenses>
    	<license>
    		<name>The Apache License, Version 2.0</name>
    		<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    	</license>
  </licenses>
  <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <developers>
    	<developer>
    		<name>Adam Hatherly</name>
    		<email>adam.hatherly@hscic.gov.uk</email>
    		<organization>Health and Social Care Information Centre</organization>
    		<organizationUrl>http://developer.nhs.uk</organizationUrl>
    	</developer>
  </developers>
  <scm>
    	<connection>scm:git:ssh://git@github.com:nhs-ciao/ciao-utils.git</connection>
    	<developerConnection>scm:git:ssh://git@github.com:nhs-ciao/ciao-utils.git</developerConnection>
    	<url>https://github.com/nhs-ciao/ciao-utils</url>
  </scm>
  <dependencies>
  	<dependency>
  		<groupId>org.mousio</groupId>
  		<artifactId>etcd4j</artifactId>
  		<version>2.3.1</version>
  	</dependency>
  	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.6.6</version>
	</dependency>
	<dependency>
	    <groupId>net.sf.jopt-simple</groupId>
	    <artifactId>jopt-simple</artifactId>
	    <version>4.8</version>
	</dependency>
  	<!-- Unit test dependencies -->
  	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.11</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-simple</artifactId>
		<version>1.6.6</version>
		<scope>test</scope>
	</dependency>	
  </dependencies>
  <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-compiler-plugin</artifactId>
   			<version>3.2</version>
   			<configuration>
   				<source>1.5</source>
   				<target>1.5</target>
   			</configuration>
   		</plugin>
  	</plugins>
  </build>
  <profiles>
  		<!-- Use this profile to push the library to maven central -->
		<!-- Usage: mvn deploy -P mavencentral -->
		<profile>
			<id>mavencentral</id>
			<build>
				<plugins>
		    		<plugin>
				      <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>
				      <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>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
					              <keyname>HSCIC CIAO</keyname>
					              <passphraseServerId>HSCIC CIAO</passphraseServerId>
					            </configuration>
							</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>
		</profile>
  </profiles>
</project>