<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.xdev-software</groupId>
	<artifactId>vaadin-maps-leaflet-flow</artifactId>

	<packaging>jar</packaging>
	<version>1.1.0</version>

	<name>LeafletMap for Vaadin</name>
	<description>LeafletMap for Vaadin</description>
	<url>https://www.xdev-software.de</url>

	<scm>
		<url>https://github.com/xdev-software/vaadin-maps-leaflet-flow</url>
		<connection>https://github.com/xdev-software/vaadin-maps-leaflet-flow.git</connection>
	</scm>

	<inceptionYear>2019</inceptionYear>

	<organization>
		<name>XDEV Software</name>
		<url>https://www.xdev-software.de</url>
	</organization>

	<developers>
		<developer>
			<name>XDEV Software</name>
			<organization>XDEV Software</organization>
			<url>https://www.xdev-software.de</url>
		</developer>
	</developers>

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

	<properties>
		<license.licenseName>apache_v2</license.licenseName>

		<javaVersion>1.8</javaVersion>
		<maven.compiler.source>${javaVersion}</maven.compiler.source>
		<maven.compiler.target>${javaVersion}</maven.compiler.target>
		<!-- Used for Java 11 -->
		<!--<maven.compiler.release>${javaVersion}</maven.compiler.release> -->

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<failOnMissingWebXml>false</failOnMissingWebXml>

		<!-- Dependency-Versions -->
		<vaadin.version>14.6.5</vaadin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-bom</artifactId>
				<type>pom</type>
				<scope>import</scope>
				<version>${vaadin.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<repositories>
		<!-- The order of definitions matters. Explicitly defining central here 
			to make sure it has the highest priority. -->
		<repository>
			<id>central</id>
			<url>https://repo.maven.apache.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

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

	<dependencies>
		<dependency>
			<groupId>com.vaadin</groupId>
			<!-- Replace artifactId with vaadin-core to use only free components -->
			<artifactId>vaadin-core</artifactId>
			<exclusions>
				<!-- Webjars are only needed when running in Vaadin 13 compatibility 
					mode -->
				<exclusion>
					<groupId>com.vaadin.webjar</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.webjars.bowergithub.insites</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.webjars.bowergithub.polymer</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.webjars.bowergithub.polymerelements</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.webjars.bowergithub.vaadin</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.webjars.bowergithub.webcomponents</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- JSON JACKSON -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.12.3</version>
		</dependency>

		<!-- Added to provide logging output as Vaadin uses -->
		<!-- the unbound SLF4J no-operation (NOP) logger implementation -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.0.0</version>
				<executions>
					<execution>
						<id>first</id>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
						<configuration>
							<roots>
								<root>src/main/java</root>
								<root>src/test/java</root>
							</roots>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Take care of synchronizing java dependencies and imports in package.json 
				and main.js files. It also creates webpack.config.js if not exists yet. -->
			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>${vaadin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-frontend</goal>
							<goal>build-frontend</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<quiet>true</quiet>
					<doclint>none</doclint>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<addClasspath>false</addClasspath>
							<addDefaultImplementationEntries>true
							</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Vaadin-Package-Version>1</Vaadin-Package-Version>
						</manifestEntries>
					</archive>
					<!-- Generated file that shouldn't be included in add-ons -->
					<excludes>
						<exclude>
							META-INF/VAADIN/config/flow-build-info.json
						</exclude>
					</excludes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>ossrh</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Fixes "gpg: signing failed: Inappropriate ioctl for device" -->
									<!-- Prevent `gpg` from using pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<!-- Sometimes OSSRH is really slow -->
							<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>directory</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<version>3.3.0</version>
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>assembly/assembly.xml</descriptor>
							</descriptors>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>single</goal>
								</goals>
								<phase>install</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>3.2.0</version>
						<configuration>
							<!-- Generated file that shouldn't be included in add-ons -->
							<excludes>
								<exclude>
									META-INF/VAADIN/config/flow-build-info.json
								</exclude>
							</excludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
