<?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.alexmao86</groupId>
	<artifactId>springframework-moquette-broker</artifactId>
	<version>1.0</version>
	<packaging>jar</packaging>
	<name>springframework-moquette-broker</name>
	<url>http://maven.apache.org</url>
	<description>
	this is springframework integration of moquetto broker
	</description>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Alex Mao</name>
			<email>maoanapex88@163.com</email>
			<organization>Personal</organization>
			<organizationUrl>http://www.nowcode.cn</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git://github.com/alexmao86/springframework-moquette-broker</connection>
		<developerConnection>scm:git:ssh://github.com/alexmao86/springframework-moquette-broker</developerConnection>
		<url>https://github.com/alexmao86/springframework-moquette-broker.git</url>
	</scm>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<netty.version>5.0.0.Alpha2</netty.version>
	</properties>
	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-log4j12</artifactId>
		    <version>1.7.25</version>
		    <scope>test</scope>
		</dependency>
		
		<dependency>
		      <groupId>io.moquette</groupId>
		      <artifactId>moquette-broker</artifactId>
		      <version>0.10</version>
		</dependency>
		
		<!-- https://mvnrepository.com/artifact/junit/junit -->
		<dependency>
		    <groupId>junit</groupId>
		    <artifactId>junit</artifactId>
		    <version>4.12</version>
			<scope>test</scope>		
		</dependency>
		
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
						
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>3.1.2.RELEASE</version>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-aop</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-asm</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<!-- <compilerArgument>-g:none</compilerArgument> -->
					<debug>true</debug>
					<target>1.8</target>
					<source>1.8</source>
					<encoding>UTF-8</encoding>   
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<addMavenDescriptor>false</addMavenDescriptor>
					<outputDirectory>${project.build.directory}/release/lib</outputDirectory>
					<archive>
			            <manifest>
			              <addClasspath>false</addClasspath>
			              <mainClass>com.bosch.v2x.ApplicationActivor</mainClass>
			            </manifest>
			          </archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<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>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>false</downloadJavadocs>
					<additionalConfig>
						<file>
							<name>.settings/org.eclipse.core.resources.prefs</name>
							<content>
		                <![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${project.build.sourceEncoding}${line.separator}]]>
							</content>
						</file>
					</additionalConfig>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
					</execution>
					<execution>
	                    <goals>
	                        <goal>sources</goal>
	                    </goals>
	                </execution>
				</executions>
				<configuration>
					<includeTypes>jar,properties</includeTypes>
					<overWriteSnapshots>true</overWriteSnapshots>
					<type>jar</type>
					 <excludeArtifactIds>junit</excludeArtifactIds>
					<outputDirectory>${project.build.directory}/release/lib</outputDirectory>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>copy-configuration-files</id>
						<phase>install</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target name="copy-configuration-files">
								<mkdir dir="${project.build.directory}/release" />
								<mkdir dir="${project.build.directory}/release/lib" />
								<mkdir dir="${project.build.directory}/release/logs" />
								<mkdir dir="${project.build.directory}/release/conf" />
								
								<echo>copying jar files from ${project.basedir} to ${project.build.directory}</echo>
								
								<copy todir="${project.build.directory}/release">
									<fileset dir="${project.basedir}/src/main/bin">
										<exclude name="*.exe4j" />
									</fileset>
								</copy>
								<copy todir="${project.build.directory}/release">
									<fileset dir="${project.basedir}/src/test/bin">
										<exclude name="*.exe4j" />
									</fileset>
								</copy>
								<copy todir="${project.build.directory}/release/conf">
									<fileset dir="${project.basedir}/conf">
										<include name="**" />
									</fileset>
								</copy>		
								<fixcrlf srcdir="${project.build.directory}/release" includes="**/*.sh" eol="lf" eof="remove" />	
								<zip destfile="${project.build.directory}/tsp-server-${project.version}.zip" basedir="${project.build.directory}/release/"/>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>		
			<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
					<configuration>
						<additionalparam>-Xdoclint:none --allow-script-in-comments</additionalparam>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
	      <groupId>org.apache.maven.plugins</groupId>
	      <artifactId>maven-gpg-plugin</artifactId>
	      <version>1.5</version>
	      <executions>
	        <execution>
	          <id>sign-artifacts</id>
	          <phase>verify</phase>
	          <goals>
	            <goal>sign</goal>
	          </goals>
	        </execution>
	      </executions>
	    </plugin>	
		</plugins>
	</build>
	<repositories>
		<repository>
			<id>bintray</id>
			<url>https://jcenter.bintray.com</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
</project>
