<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>
	<groupId>org.yamcs</groupId>
	<artifactId>jsle</artifactId>
	<packaging>jar</packaging>
	<version>1.0.0</version>
	<name>jsle</name>
	<url>https://github.com/yamcs/jsle</url>
	<description>Java implementation for the SLE (Space Link Extension) protocol.</description>
	<licenses>
		<license>
      			<name>GNU Lesser General Public License (LGPL)</name>
      			<url>https://www.gnu.org/licenses/lgpl-3.0.html</url>
		</license>
	</licenses>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<scm>
		<connection>scm:git:git@github.com:yamcs/jsle.git</connection>
		<developerConnection>scm:git:ssh@github.com:yamcs/jsle.git</developerConnection>
		<url>https://github.com/yamcs/jsle</url>
		<tag>HEAD</tag>
	</scm>

	<organization>
		<name>Space Applications Services</name>
		<url>https://www.spaceapplications.com</url>
	</organization>

	<developers>
		<developer>
			<id>fqqb</id>
			<name>Fabian Diet</name>
		</developer>
		<developer>
			<id>xpromache</id>
			<name>Nicolae Mihalache</name>
		</developer>
	</developers>

	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.openmuc/jasn1-compiler -->
		<dependency>
			<groupId>com.beanit</groupId>
			<artifactId>jasn1</artifactId>
			<version>1.11.2</version>
		</dependency>

		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-handler</artifactId>
			<version>4.1.77.Final</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>


	</dependencies>
	<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>


	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
                                        <release>11</release>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/java-generated</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.0.1</version>
				<configuration>
					<additionalOptions>
						<additionalOption>-Xdoclint:none</additionalOption>
						<additionalOption>-Xdoclint:html</additionalOption>
						<additionalOption>-Xdoclint:reference</additionalOption>
						<!-- the 'syntax' group is too strict with @param and @throws -->
						<!-- additionalOption>-Xdoclint:syntax</additionalOption -->
					</additionalOptions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>jsle-release</releaseProfiles>
					<pushChanges>false</pushChanges>
					<localCheckout>true</localCheckout>
					<goals>deploy</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<configuration>
					<mainClass>org.yamcs.jsle.udpslebridge.SleUdpBridge</mainClass>
					<arguments>
						<argument>-c</argument>
						<argument>bridge.properties</argument>
					</arguments>
				</configuration>
			</plugin>


		</plugins>
	</build>

	<profiles>
		<profile>
			<id>jsle-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.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<keyname>yamcs@spaceapplications.com</keyname>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</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-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<version>3.1.0</version>
						<configuration>
							<attach>false</attach>
							<descriptors>
								<descriptor>distribution/jsle.descriptor.xml</descriptor>
							</descriptors>
							<appendAssemblyId>false</appendAssemblyId>
                                                        <tarLongFileMode>posix</tarLongFileMode>
						</configuration>
						<executions>
							<execution>
								<id>make-assembly</id> <!-- this is used for inheritance merges -->
								<phase>package</phase> <!-- bind to the packaging phase -->
								<goals>
									<goal>single</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>

			</build>
		</profile>

	</profiles>

</project>
