<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">
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>es.arcadiaconsulting.graylog2</groupId>
	<artifactId>jboss-logging-gelf</artifactId>
	<packaging>jar</packaging>
	<version>1.0.2</version>
	<name>JBoss Logging Gelf components</name>

	<description>GELF Appender for JBoss Logging system. Use this appender to log messages to a graylog2 server via GELF messages.</description>
	<url>https://github.com/ArcadiaConsulting/jboss-logging-gelf</url>

	<inceptionYear>2013</inceptionYear>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:ArcadiaConsulting/jboss-logging-gelf.git</connection>
		<developerConnection>scm:git:git@github.com:ArcadiaConsulting/jboss-logging-gelf.git</developerConnection>
		<url>git@github.com:ArcadiaConsulting/jboss-logging-gelf.git</url>
	</scm>

	<developers>
		<developer>
			<id>gonzalogomezgarcia</id>
			<name>Gonzalo Gómez García</name>
			<email>gonzalo@arcadiaconsulting.es</email>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>org.jboss.logging</groupId>
			<artifactId>jboss-logging</artifactId>
			<version>${jboss.logging.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.logmanager</groupId>
			<artifactId>jboss-logmanager</artifactId>
			<version>${jboss.logmanager.version}</version>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.9</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>2.0.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>14.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<properties>
		<jboss.logging.version>3.1.4.GA</jboss.logging.version>
		<jboss.logmanager.version>1.2.2.GA</jboss.logmanager.version>
	</properties>
	<profiles>
		<profile>
			<id>dev</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.zeroturnaround</groupId>
						<artifactId>jrebel-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>generate-rebel-xml</id>
								<phase>process-resources</phase>
								<goals>
									<goal>generate</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<relativePath>../</relativePath>
							<rootPath>$${jboss-login-gelf.sources}</rootPath>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<executions>
							<execution>
								<id>deploy</id>
								<phase>package</phase>
								<configuration>
									<target>
										<property environment="env" />
										<property name="maven.project.artifactId" value="${project.artifactId}" />
										<property name="maven.project.version" value="${project.version}" />
										<property name="deployDir" value="${env.JBOSS_GELF_HOME}/modules/es/arcadiaconsulting/graylog2/main" />
										<copy file="target/${maven.project.artifactId}-${maven.project.version}.jar" tofile="${deployDir}/${maven.project.artifactId}.jar" />
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>jboss7-module-assembly</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<finalName>${project.artifactId}-jboss7-module-${project.version}</finalName>
									<descriptors>
										<descriptor>src/main/assembly/jboss7-module.xml</descriptor>
									</descriptors>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-deploy-plugin</artifactId>
						<executions>
							<execution>
								<id>deploy-jboss7-module</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy-file</goal>
								</goals>
								<configuration>
									<file>target/${project.artifactId}-jboss7-module-${project.version}.zip</file>
									<artifactId>jboss7-module</artifactId>
									<groupId>${project.groupId}</groupId>
									<version>${project.version}</version>
									<packaging>zip</packaging>
									<url>${project.distributionManagement.repository.url}</url>
								</configuration>
							</execution>
						</executions>
					</plugin>					
				</plugins>
			</build>
			
		</profile>
	</profiles>
</project>
