<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">
	<modelVersion>4.0.0</modelVersion>

	<properties>
		<repositoryUrl>http://artifactory.javassh.com/</repositoryUrl>
		<releasesUrl>${repositoryUrl}/libs-releases-local/</releasesUrl>
		<snapshotsUrl>${repositoryUrl}/libs-snapshots-local/</snapshotsUrl>
	</properties>

	<artifactId>sshd-all</artifactId>
	<packaging>jar</packaging>
	<name>Maverick SSHD Distributable Jar</name>
	<url>${sitesUrl}/${project.groupId}.${project.artifactId}</url>
	<parent>
		<groupId>com.sshtools.maverick</groupId>
		<artifactId>sshd-group</artifactId>
		<version>1.5.1-SNAPSHOT</version>
		<relativePath>../sshd-group</relativePath>
	</parent>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>assembly</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<phase>package</phase>
						<configuration>
							<target>
								<taskdef name="yguard_obfuscate" classname="com.yworks.yguard.YGuardTask"
									classpath="../build-tools/yguard/lib/yguard.jar" />
								<yguard_obfuscate>
									<inoutpair
										in="target/${project.artifactId}-${project.version}.jar" out="target/maverick-sshd-all.jar" />
									<shrink logfile="target/log-shrink.xml">
										<keep>
											<class classes="protected" methods="protected" fields="protected" />
										</keep>
									</shrink>

									<!-- We don't want to conserve the manifest because then it wont 
										match the jar's contents and the jar will be unverifiable once signed using 
										jarsigner -->
									<rename logfile="target/log-rename.xml"
										conservemanifest="false" replaceclassnamestrings="true">
										<property name="language-conformity" value="compatible" />
										<property name="digests" value="SHA-1" />
										<keep>
											<class classes="protected" methods="protected" fields="protected" />
										</keep>
									</rename>
								</yguard_obfuscate>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<keystore>${signingFiles}/${certificate.keystore}</keystore>
					<keypass>${certificate.password}</keypass>
					<storepass>${certificate.password}</storepass>
					<storetype>${certificate.storetype}</storetype>
					<alias>${certificate.alias}</alias>
					<verify>true</verify>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dolphin-modules</id>
			<dependencies>
				<dependency>
					<groupId>com.sshtools.maverick</groupId>
					<artifactId>sshd-dolphin</artifactId>
					<version>${project.version}</version>
					<type>jar</type>
					<scope>compile</scope>
					<exclusions>
						<exclusion>
							<groupId>commons-logging</groupId>
							<artifactId>commons-logging-api</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
			</dependencies>
			<activation>
				<!-- 1.7 or later -->
				<jdk>[1.7,)</jdk>
			</activation>
		</profile>
	</profiles>


	<dependencies>
		<dependency>
			<groupId>com.sshtools.maverick</groupId>
			<artifactId>sshd</artifactId>
			<version>${project.version}</version>
			<type>jar</type>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.sshtools.maverick</groupId>
			<artifactId>maverick</artifactId>
			<version>${maverickVersion}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.sshtools.maverick</groupId>
			<artifactId>maverick-util</artifactId>
			<version>${maverickOpensourceVersion}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
	</dependencies>
</project>
