<?xml version="1.0" encoding="UTF-8"?>
<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>com.github.dubasdey</groupId>
	<artifactId>log4j2-jsonevent-layout</artifactId>
	<version>0.0.4</version>
	<name>log4j2-jsonevent-layout</name>
	<description>Log4j2 JSON Event layout without third party dependencies</description>
	<url>https://github.com/dubasdey/log4j2-jsonevent-layout</url>
	
	<licenses>
	    <license>
	        <name>GNU LGPL v3</name>
	        <url>https://www.gnu.org/licenses/lgpl-3.0.en.html</url>
	        <distribution>repo</distribution>
	    </license>
	</licenses>
	
	<scm>
    	<url>https://github.com/dubasdey/log4j2-jsonevent-layout</url>
    	<connection>scm:git:git://github.com/dubasdey/log4j2-jsonevent-layout.git</connection>
    	<developerConnection>scm:git:git@github.com:dubasdey/log4j2-jsonevent-layout.git</developerConnection>
	</scm>

	<properties>
		<java.version>6</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	
	<developers>
	    <developer>
	        <id>erodriguez</id>
	        <name>Eduardo Rodríguez</name>
	        <email>eduardo@rodriguezcarro.es</email>
	    </developer>
	</developers>
	
	<dependencies>
		<dependency>
    		<groupId>org.apache.logging.log4j</groupId>
    		<artifactId>log4j-core</artifactId>
    		<version>2.3</version>
    		<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>		
	</dependencies>
	
	
	<distributionManagement>
	    <snapshotRepository>
	        <id>ossrh</id>
	        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	    </snapshotRepository>
	</distributionManagement>


	<profiles>
	    <profile>
	        <id>sign</id>
	        <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>
	                        </execution>
	                    </executions>
	                </plugin>
	            </plugins>
	        </build>
	    </profile>
	    
 		<profile>
	        <id>build-extras</id>
	        <activation>
	            <activeByDefault>true</activeByDefault>
	        </activation>
	        <build>
	            <plugins>
	                <plugin>
	                    <groupId>org.apache.maven.plugins</groupId>
	                    <artifactId>maven-source-plugin</artifactId>
	                    <version>2.4</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.10.3</version>
	                    <executions>
	                        <execution>
	                            <id>attach-javadocs</id>
	                            <goals>
	                                <goal>jar</goal>
	                            </goals>
	                        </execution>
	                    </executions>
	                </plugin>
	            </plugins>
	        </build>
	    </profile>
	    
	</profiles>
	
	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
				<executions>
					<execution>
						<id>log4j-plugin-processor</id>
						<goals>
							<goal>compile</goal>
						</goals>
						<phase>process-classes</phase>
						<configuration>
							<proc>only</proc>
							<annotationProcessors>
								<annotationProcessor>org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor</annotationProcessor>
							</annotationProcessors>
						</configuration>
					</execution>
				</executions>				
			</plugin>
			
			
	        <plugin>
	            <groupId>org.sonatype.plugins</groupId>
	            <artifactId>nexus-staging-maven-plugin</artifactId>
	            <version>1.6.6</version>
	            <extensions>true</extensions>
	            <configuration>
	                <serverId>ossrh</serverId>
	                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
	                <autoReleaseAfterClose>true</autoReleaseAfterClose>
	            </configuration>
	        </plugin>

		</plugins>
	</build>	
</project>
