<?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/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>de.flapdoodle.embed</groupId>
    <artifactId>de.flapdoodle.embed.process</artifactId>
    <name>Flapdoodle Embedded Process Util</name>
    <version>4.13.1</version>
    <packaging>bundle</packaging>

    <description>A embedded process starter ...</description>
    <url>http://github.com/flapdoodle-oss/de.flapdoodle.embed.process</url>

    <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>
    <developers>
        <developer>
            <name>Michael Mosmann</name>
            <email>michael@mosmann.de</email>
            <organization>Flapdoodle OSS</organization>
            <organizationUrl>http://github.com/flapdoodle-oss</organizationUrl>
        </developer>
    </developers>


    <scm>
        <connection>scm:git:git@github.com:flapdoodle-oss/de.flapdoodle.embed.process.git</connection>
        <developerConnection>scm:git:git@github.com:flapdoodle-oss/de.flapdoodle.embed.process.git</developerConnection>
        <url>git@github.com:flapdoodle-oss/de.flapdoodle.embed.process.git</url>
      <tag>de.flapdoodle.embed.process-4.13.1</tag>
  </scm>

    <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>
    
    <!-- https://docs.sonatype.org/display/Repository/Central+Sync+Requirements
    https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide 
    https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.17.0</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <compilerVersion>1.8</compilerVersion>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>enforce-ban-duplicate-classes</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence />
                                <banDuplicateClasses>
                                    <ignoreClasses>
                                        <!-- example of ignoring one specific class -->
                                        <!-- 
                                        <ignoreClass>com.xyz.i18n.Messages</ignoreClass>
                                        -->
                                        <!-- example of ignoring with wildcards -->
                                        <!-- 
                                        <ignoreClass>org.apache.commons.logging.*</ignoreClass>
                                        -->
                                    </ignoreClasses>
                                    <findAllDuplicates>true</findAllDuplicates>
                                </banDuplicateClasses>
                                <requireMavenVersion>
                                    <version>3.6.3</version>
                                </requireMavenVersion>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>extra-enforcer-rules</artifactId>
                        <version>1.8.0</version>
                    </dependency>
                </dependencies>
            </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</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <forkCount>1.5C</forkCount>
                    <excludes>
                        <exclude>**/live/**</exclude>
                        <exclude>**/examples/**</exclude>
                    </excludes>
                    <systemPropertyVariables>
                        <de.flapdoodle.testdoc.destination>${project.basedir}</de.flapdoodle.testdoc.destination>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.5</version>
                <configuration>
                    <!-- <basedir>${basedir}</basedir> -->
                    <header>${basedir}/src/etc/header.txt</header>
                    <!-- <validHeaders> <validHeader>/otherSupportedHeader.txt</validHeader> 
                    <validHeader>http://www.company.com/yetAnotherSupportedHeader.txt</validHeader> 
                    </validHeaders> -->
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <strictCheck>true</strictCheck>
                    <aggregate>false</aggregate>
                    <includes>
                        <include>src/**</include>
                        <include>**/test/**</include>
                    </includes>
                    <excludes>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.tgz</exclude>
                        <exclude>**/*.tbz2</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <!-- <excludes> <exclude>target/**</exclude> <exclude>.clover/**</exclude> 
                    </excludes>  -->
                    <!-- <mapping> <jwc>XML_STYLE</jwc> <application>XML_STYLE</application> 
                    <myFileExtension>JAVADOC_STYLE</myFileExtension> </mapping> <useDefaultMapping>true</useDefaultMapping> -->
                    <properties>
                        <lic.year>2011</lic.year>
                        <lic.email>michael@mosmann.de</lic.email>
                        <lic.username>Michael Mosmann</lic.username>
                        <lic.email2>m.joehren@googlemail.com</lic.email2>
                        <lic.username2>Martin Jöhren</lic.username2>
                        <lic.developers>
	konstantin-ba@github,
	Archimedes Trajano (trajano@github),
	Kevin D. Keck (kdkeck@github),
	Ben McCann (benmccann@github)</lic.developers>
                    </properties>
                    <encoding>UTF-8</encoding>
                    <!-- <headerDefinitions> <headerDefinition>def1.xml</headerDefinition> 
                    <headerDefinition>def2.xml</headerDefinition> </headerDefinitions> -->
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.4.0</version>
                <configuration>
                    <configLocation>config/checkstyle.xml</configLocation>
                    <excludes>
                        ${basedir}/src/test/**/*
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>3.4.0</version>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>5.1.9</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Category>Utilities</Bundle-Category>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Description>${project.description}</Bundle-Description>
                        <Export-Package>${osgi.export}</Export-Package>
                        <Import-Package>${osgi.import}</Import-Package>
                    </instructions>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <!-- <execution> <id>check</id> <goals> <goal>check</goal> </goals> 
                    <configuration> <check> <classRatio>100</classRatio> <instructionRatio>90</instructionRatio> 
                    <methodRatio>95</methodRatio> <branchRatio>85</branchRatio> <complexityRatio>85</complexityRatio> 
                    <lineRatio>90</lineRatio> </check> </configuration> </execution> -->
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.7.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                        	<source>8</source>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>[1.8,)</version>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
        </plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-toolchains-plugin
										</artifactId>
										<versionRange>
											[1.1,)
										</versionRange>
										<goals>
											<goal>toolchain</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</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>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
        	<id>travis</id>
        	<build>
        		<plugins>
		            <plugin>
		                <groupId>org.apache.maven.plugins</groupId>
		                <artifactId>maven-toolchains-plugin</artifactId>
		                <version>1.1</version>
		                <executions>
		                    <execution>
		                    	<phase>none</phase>
		                        <goals>
		                            <goal>toolchain</goal>
		                        </goals>
		                    </execution>
		                </executions>
		            </plugin>
        		</plugins>
        	</build>
        </profile>
    </profiles>

    <properties>
        <junit.version>5.10.2</junit.version>
        <immutables.version>2.10.1</immutables.version>
        <jna.version>5.14.0</jna.version>
        <osgi.category>Bundles</osgi.category>
        <osgi.export>
            de.flapdoodle.embed.process;version=${project.version},
            de.flapdoodle.embed.process.builder;version=${project.version},
            de.flapdoodle.embed.process.collections;version=${project.version},
            de.flapdoodle.embed.process.config;version=${project.version},
            de.flapdoodle.embed.process.config.io;version=${project.version},
            de.flapdoodle.embed.process.config.process;version=${project.version},
            de.flapdoodle.embed.process.config.store;version=${project.version},
            de.flapdoodle.embed.process.distribution;version=${project.version},
            de.flapdoodle.embed.process.exceptions;version=${project.version},
            de.flapdoodle.embed.process.extract;version=${project.version},
            de.flapdoodle.embed.process.io;version=${project.version},
            de.flapdoodle.embed.process.io.directories;version=${project.version},
            de.flapdoodle.embed.process.io.file;version=${project.version},
            de.flapdoodle.embed.process.io.progress;version=${project.version},
            de.flapdoodle.embed.process.runtime;version=${project.version},
            de.flapdoodle.embed.process.store;version=${project.version}
        </osgi.export>
        <osgi.import>
            javax.lang.model,
            com.sun.jna,
            com.sun.jna.platform.win32,
            org.apache.commons.compress.archivers,
            org.apache.commons.compress.archivers.zip,
            org.apache.commons.compress.archivers.tar,
            org.apache.commons.compress.compressors.bzip2,
            org.apache.commons.compress.compressors.xz,
            org.apache.commons.compress.compressors.gzip,
            org.apache.commons.lang3,
            org.apache.commons.io,
            org.slf4j
        </osgi.import>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- eclipse apt switch -->
        <m2e.apt.activation>jdt_apt</m2e.apt.activation>
    </properties>

    <dependencies>
        <!-- tests -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.26.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.flapdoodle.testdoc</groupId>
            <artifactId>de.flapdoodle.testdoc</artifactId>
            <version>1.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>guru.nidi</groupId>
            <artifactId>graphviz-java</artifactId>
            <version>0.18.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.nanohttpd</groupId>
            <artifactId>nanohttpd</artifactId>
            <version>2.3.1</version>
            <scope>test</scope>
        </dependency>

        <!-- common -->
        <dependency>
            <groupId>de.flapdoodle.reverse</groupId>
            <artifactId>de.flapdoodle.reverse</artifactId>
            <version>1.7.2</version>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>value</artifactId>
            <version>${immutables.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>builder</artifactId>
            <version>${immutables.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- archive handling -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.14.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.26.2</version>
        </dependency>

        <!-- platform process stuff -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>${jna.version}</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>${jna.version}</version>
        </dependency>

        <!-- os detection -->
        <dependency>
            <groupId>de.flapdoodle</groupId>
            <artifactId>de.flapdoodle.os-api</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>de.flapdoodle</groupId>
            <artifactId>de.flapdoodle.os</artifactId>
            <version>1.7.0</version>
            <scope>test</scope>
        </dependency>

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.36</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.36</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>
