<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>io.firebus</groupId>
  <artifactId>firebus-core</artifactId>
  <version>1.0.0</version>
  
 <name>Firebus Core</name>
  <description>Firebus core functionality</description>
  <url>https://github.com/ngrondin/firebus</url>
 
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
 
  <scm>
    <url>https://github.com/ngrondin/firebus.git</url>
  </scm>
  
   <developers>
        <developer>
            <id>ngrondin78@gmail.com</id>
            <name>Nicolas Grondin</name>
            <email>ngrondin78@gmail.com</email>
        </developer>
    </developers>
  	
	<profiles>
	  <profile>
	    <id>local</id>
		<build>
		  <plugins>
		    <plugin>    
		        <artifactId>maven-compiler-plugin</artifactId>
		        <configuration>
		            <source>1.8</source>
		            <target>1.8</target>
		        </configuration>
		    </plugin>	  
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.4.1</version>
				<configuration>
					<!-- get all project dependencies -->
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<!-- MainClass in mainfest make a executable jar -->
					<archive>
					  <manifest>
						<mainClass>io.firebus.tools.Console</mainClass>
					  </manifest>
					</archive>
				</configuration>
				<executions>
				  <execution>
					<id>make-assembly</id>
					<phase>package</phase> 
					<goals>
						<goal>single</goal>
					</goals>
				  </execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>		
		  </plugins>
		</build>  	  
	  </profile>
	  <profile>
	      <id>release</id>
	      <build>
	          <plugins>
	              <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-source-plugin</artifactId>
	                  <version>3.0.1</version>
	                  <executions>
	                      <execution>
	                          <id>attach-sources</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>
					          <configuration>
					              <keyname>${gpg.keyname}</keyname>
					              <passphraseServerId>${gpg.keyname}</passphraseServerId>
					          </configuration>	                          
	                      </execution>
	                  </executions>
	              </plugin>
	              <plugin>
	                  <groupId>org.sonatype.plugins</groupId>
	                  <artifactId>nexus-staging-maven-plugin</artifactId>
	                  <version>1.6.8</version>
	                  <extensions>true</extensions>
	                  <configuration>
	                      <serverId>ossrh</serverId>
	                      <nexusUrl>https://oss.sonatype.org/</nexusUrl>
	                      <autoReleaseAfterClose>true</autoReleaseAfterClose>
	                  </configuration>
	              </plugin>
	          </plugins>
	      </build>
	  </profile>			
	</profiles>

	<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>